@@ -41,7 +41,7 @@ test("flushes partial and full batches", async (t) => {
4141 } else if (url.pathname === "/batch") {
4242 await env.QUEUE.sendBatch(body);
4343 }
44- return new Response();
44+ return new Response(null, { status: 204 } );
4545 }
4646 }` ,
4747 } ,
@@ -232,7 +232,7 @@ test("sends all structured cloneable types", async (t) => {
232232 await env.QUEUE.sendBatch(Object.entries(VALUES).map(
233233 ([key, value]) => ({ body: { name: key, value } })
234234 ));
235- return new Response();
235+ return new Response(null, { status: 204 } );
236236 },
237237 async queue(batch, env, ctx) {
238238 let error;
@@ -305,7 +305,7 @@ test("retries messages", async (t) => {
305305 const url = new URL(request.url);
306306 const body = await request.json();
307307 await env.QUEUE.sendBatch(body);
308- return new Response();
308+ return new Response(null, { status: 204 } );
309309 },
310310 async queue(batch, env, ctx) {
311311 const res = await env.RETRY_FILTER.fetch("http://localhost", {
@@ -532,7 +532,7 @@ test("moves to dead letter queue", async (t) => {
532532 const url = new URL(request.url);
533533 const body = await request.json();
534534 await env.BAD_QUEUE.sendBatch(body);
535- return new Response();
535+ return new Response(null, { status: 204 } );
536536 },
537537 async queue(batch, env, ctx) {
538538 const res = await env.RETRY_FILTER.fetch("http://localhost", {
@@ -638,7 +638,7 @@ test("operations permit strange queue names", async (t) => {
638638 async fetch(request, env, ctx) {
639639 await env.QUEUE.send("msg1");
640640 await env.QUEUE.sendBatch([{ body: "msg2" }]);
641- return new Response();
641+ return new Response(null, { status: 204 } );
642642 },
643643 async queue(batch, env, ctx) {
644644 await env.REPORTER.fetch("http://localhost", {
@@ -718,7 +718,8 @@ test("supports message contentTypes", async (t) => {
718718 },
719719};` ,
720720 } ) ;
721- await mf . dispatchFetch ( "http://localhost" ) ;
721+ const res = await mf . dispatchFetch ( "http://localhost" ) ;
722+ await res . arrayBuffer ( ) ; // (drain)
722723 timers . timestamp += 1000 ;
723724 await timers . waitForTasks ( ) ;
724725 const batch = await promise ;
0 commit comments