cloudflare / workers-sdk

⛅️ Home to Wrangler, the CLI for Cloudflare Workers®
https://developers.cloudflare.com/workers/
Apache License 2.0
2.43k stars 606 forks source link

chore: investigate fixtures tests flakiness #6205

Open petebacondarwin opened 1 week ago

petebacondarwin commented 1 week ago
petebacondarwin commented 1 week ago

An example of such a flaky test is the get-platform-proxy fixture:

   ❯ tests/get-platform-proxy.env.test.ts  (18 tests) 25004ms

  ⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯

   FAIL  tests/get-platform-proxy.env.test.ts > getPlatformProxy - env
  Error: Hook timed out in 25000ms.
  If this is a long-running hook, pass a timeout value as the last argument or configure it globally with "hookTimeout".
  ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/2]⎯

   FAIL  tests/get-platform-proxy.env.test.ts > getPlatformProxy - env
  TypeError: Cannot read properties of undefined (reading 'map')
   ❯ tests/get-platform-proxy.env.test.ts:55:39
       53| 
       54|  afterAll(async () => {
       55|   await Promise.allSettled(devWorkers.map((i) => i.stop()));
         |                                       ^
       56|  });
       57| 

  ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/2]⎯