cloudflare / cloudflare/workerd

🐛 Bug Report — Error running many tests

Open
#5,507 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
8.7k
Forks
739
Avg merge
2d 20h
Merged PRs (30d)
174

Description

I get the following error when running tests locally (unfortunately the codebase is closed source):

```
TypeError: fetch failed
❯ fetch ../node_modules/undici/index.js:124:13
❯ process.processTicksAndRejections node:internal/process/task_queues:105:5
❯ MessagePort. [worker eval]:28:22

Caused by: Error: connect EADDRNOTAVAIL 127.0.0.1:53353 - Local (0.0.0.0:0)
❯ internalConnect node:net:1110:16
❯ defaultTriggerAsyncIdScope node:internal/async_hooks:472:18
❯ node:net:1356:9
❯ process.processTicksAndRejections node:internal/process/task_queues:85:11
```

I see it at the end, when all tests have passed.

I don't get this:
* in github actions (with the same setup otherwise)
* when running tests for each file independently
* with `singleWorker: true`

But when running locally with just `npm run test` or `CI=1 npm run test` I get this 100% of the time.

Test output when tests pass:

```
Test Files 26 passed (26)
Tests 258 passed | 3 skipped (261)
Start at 12:25:22
Duration 102.88s (transform 471ms, setup 8.79s, collect 334ms, tests 92.94s, environment 0ms, prepare 73ms)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.