@@ -600,26 +600,26 @@ test('Gives up retrying on API rate limiting after a timeout', async (t) => {
600
600
t . false ( scope . isDone ( ) )
601
601
} )
602
602
603
- const errorCodes = [ 'ETIMEDOUT' , 'ECONNRESET' ]
604
- errorCodes . forEach ( ( code ) => {
605
- test ( `Retries on ${ code } connection errors` , async ( t ) => {
606
- const accountId = uuidv4 ( )
607
- const retryAtMs = Date . now ( ) + TEST_RATE_LIMIT_DELAY
608
- const expectedResponse = { test : 'test' }
609
- const scope = nock ( origin )
610
- . get ( `${ pathPrefix } /accounts/${ accountId } ` )
611
- . replyWithError ( { code } )
612
- . get ( `${ pathPrefix } /accounts/${ accountId } ` )
613
- . reply ( 200 , expectedResponse )
614
-
615
- const client : any = getClient ( )
616
- const response : any = await client . getAccount ( { account_id : accountId } )
617
-
618
- t . true ( Date . now ( ) >= retryAtMs )
619
- t . deepEqual ( response , expectedResponse )
620
- t . true ( scope . isDone ( ) )
621
- } )
622
- } )
603
+ // const errorCodes = ['ETIMEDOUT', 'ECONNRESET']
604
+ // errorCodes.forEach((code) => {
605
+ // test(`Retries on ${code} connection errors`, async (t) => {
606
+ // const accountId = uuidv4()
607
+ // const retryAtMs = Date.now() + TEST_RATE_LIMIT_DELAY
608
+ // const expectedResponse = { test: 'test' }
609
+ // const scope = nock(origin)
610
+ // .get(`${pathPrefix}/accounts/${accountId}`)
611
+ // .replyWithError({ code })
612
+ // .get(`${pathPrefix}/accounts/${accountId}`)
613
+ // .reply(200, expectedResponse)
614
+
615
+ // const client: any = getClient()
616
+ // const response: any = await client.getAccount({ account_id: accountId })
617
+
618
+ // t.true(Date.now() >= retryAtMs)
619
+ // t.deepEqual(response, expectedResponse)
620
+ // t.true(scope.isDone())
621
+ // })
622
+ // })
623
623
624
624
test ( 'Recreates a function body when handling API rate limiting' , async ( t ) => {
625
625
const deployId = uuidv4 ( )
0 commit comments