@@ -386,13 +386,15 @@ test("DevRegistry: fetch to module worker with node bindings", async (t) => {
386386 t . teardown ( ( ) => local . dispose ( ) ) ;
387387
388388 const bindings = await local . getBindings < Record < string , any > > ( ) ;
389- const res = await bindings . SERVICE . fetch ( "http://example.com?name=World" ) ;
390389
391- t . is (
392- await res . text ( ) ,
393- `Couldn\'t find a local dev session for the "default" entrypoint of service "remote-worker" to proxy to`
394- ) ;
395- t . is ( res . status , 503 ) ;
390+ await waitUntil ( t , async ( t ) => {
391+ const res = await bindings . SERVICE . fetch ( "http://example.com?name=World" ) ;
392+ t . is (
393+ await res . text ( ) ,
394+ `Couldn\'t find a local dev session for the "default" entrypoint of service "remote-worker" to proxy to`
395+ ) ;
396+ t . is ( res . status , 503 ) ;
397+ } ) ;
396398
397399 const remote = new Miniflare ( {
398400 name : "remote-worker" ,
@@ -460,15 +462,17 @@ test("DevRegistry: RPC to default entrypoint with node bindings", async (t) => {
460462
461463 const env = await local . getBindings < Record < string , any > > ( ) ;
462464
463- try {
464- const result = await env . SERVICE . ping ( ) ;
465- t . fail ( `Expected error, got result: ${ result } ` ) ;
466- } catch ( e ) {
467- t . is (
468- e instanceof Error ? e . message : `${ e } ` ,
469- `Cannot access "ping" as we couldn\'t find a local dev session for the "default" entrypoint of service "remote-worker" to proxy to.`
470- ) ;
471- }
465+ await waitUntil ( t , async ( t ) => {
466+ try {
467+ const result = await env . SERVICE . ping ( ) ;
468+ t . fail ( `Expected error, got result: ${ result } ` ) ;
469+ } catch ( e ) {
470+ t . is (
471+ e instanceof Error ? e . message : `${ e } ` ,
472+ `Cannot access "ping" as we couldn\'t find a local dev session for the "default" entrypoint of service "remote-worker" to proxy to.`
473+ ) ;
474+ }
475+ } ) ;
472476
473477 const remote = new Miniflare ( {
474478 name : "remote-worker" ,
0 commit comments