@@ -6,7 +6,7 @@ import { WranglerE2ETestHelper } from "./helpers/e2e-wrangler-test";
66import { fetchText } from "./helpers/fetch-text" ;
77import { generateResourceName } from "./helpers/generate-resource-name" ;
88import { normalizeOutput } from "./helpers/normalize" ;
9- import { retry } from "./helpers/retry " ;
9+ import { waitForLong } from "./helpers/wait-for " ;
1010
1111const TIMEOUT = 500_000 ;
1212const normalize = ( str : string ) => {
@@ -122,11 +122,13 @@ describe.skipIf(!CLOUDFLARE_ACCOUNT_ID)(
122122 assert ( d1Match ?. groups ) ;
123123 d1Id = d1Match . groups . d1 ;
124124
125- const response = await retry (
126- ( resp ) => ! resp . ok ,
127- async ( ) => await fetch ( deployedUrl )
125+ await waitForLong (
126+ async ( ) => {
127+ const response = await fetch ( deployedUrl ) ;
128+ expect ( await response . text ( ) ) . toEqual ( "Hello World!" ) ;
129+ } ,
130+ { timeout : 30_000 }
128131 ) ;
129- await expect ( response . text ( ) ) . resolves . toEqual ( "Hello World!" ) ;
130132 } ) ;
131133
132134 it ( "can inherit bindings on re-deploy and won't re-provision" , async ( {
@@ -149,11 +151,13 @@ describe.skipIf(!CLOUDFLARE_ACCOUNT_ID)(
149151 Current Version ID: 00000000-0000-0000-0000-000000000000"
150152 ` ) ;
151153
152- const response = await retry (
153- ( resp ) => ! resp . ok ,
154- async ( ) => await fetch ( deployedUrl )
154+ await waitForLong (
155+ async ( ) => {
156+ const response = await fetch ( deployedUrl ) ;
157+ expect ( await response . text ( ) ) . toEqual ( "Hello World!" ) ;
158+ } ,
159+ { timeout : 30_000 }
155160 ) ;
156- await expect ( response . text ( ) ) . resolves . toEqual ( "Hello World!" ) ;
157161 } ) ;
158162 it ( "can inspect current bindings" , async ( { expect } ) => {
159163 const versionsRaw = await helper . run ( `wrangler versions list --json` ) ;
0 commit comments