You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request for Miniflare 3: Ability to wait for request context death #5258
It can be useful to write tests where you assert certain behavior after you know that all waitUntil tasks have completed (e.g. you want to assert background logs were generated correctly). To do so, there needs to be some mechanism between workerd and Miniflare to enable this.
Option 1: Per-request await. There's some API that lets you know when the request context for a given response has died (e.g. maybe an extra parameter in the cf object like resp.cf.requestContextDeath?
Option 2: Wait for all request contexts to be dead within workerd.
Option 1 is the most flexible and let's you write very precise tests (option 2 can be implemented in terms of option 1 without extra workerd machinery).
Option 2 is probably a good enough MVP to enable all interesting tests and might be the more palatable option from the workerd perspective (not 100% sure).
Hey! 👋 I'm going to transfer this to workers-sdk as that's the new home for Miniflare 3, and that will make it easier for us to track this. This probably still needs support from workerd though. 👍
Activity
mrbbot commentedon Nov 7, 2023
Hey! 👋 I'm going to transfer this to
workers-sdkas that's the new home for Miniflare 3, and that will make it easier for us to track this. This probably still needs support fromworkerdthough. 👍