diff --git a/clients/algoliasearch-client-javascript/packages/client-common/src/__tests__/create-iterable-promise.test.ts b/clients/algoliasearch-client-javascript/packages/client-common/src/__tests__/create-iterable-promise.test.ts index a33c22629c..80b2430ac3 100644 --- a/clients/algoliasearch-client-javascript/packages/client-common/src/__tests__/create-iterable-promise.test.ts +++ b/clients/algoliasearch-client-javascript/packages/client-common/src/__tests__/create-iterable-promise.test.ts @@ -112,7 +112,7 @@ describe('createIterablePromise', () => { await expect(promise).resolves.toEqual('success #2'); expect(Date.now() - before).toBeGreaterThanOrEqual(0); - expect(Date.now() - before).toBeLessThanOrEqual(10); + expect(Date.now() - before).toBeLessThanOrEqual(20); expect(calls).toBe(2); }); @@ -133,7 +133,7 @@ describe('createIterablePromise', () => { await expect(promise).resolves.toEqual('success #2'); expect(Date.now() - before).toBeGreaterThanOrEqual(2000); - expect(Date.now() - before).toBeLessThanOrEqual(2010); + expect(Date.now() - before).toBeLessThanOrEqual(2020); expect(calls).toBe(2); }); }); diff --git a/clients/algoliasearch-client-javascript/packages/requester-fetch/src/__tests__/fetch-requester.test.ts b/clients/algoliasearch-client-javascript/packages/requester-fetch/src/__tests__/fetch-requester.test.ts index ce46b5ef39..f7b320419b 100644 --- a/clients/algoliasearch-client-javascript/packages/requester-fetch/src/__tests__/fetch-requester.test.ts +++ b/clients/algoliasearch-client-javascript/packages/requester-fetch/src/__tests__/fetch-requester.test.ts @@ -130,7 +130,7 @@ describe('timeout handling', () => { const response = await requester.send({ ...timeoutRequest, connectTimeout: 1000, - url: 'http://localhost:1111/connection_timeout', + url: 'http://localhost:1113/connection_timeout', }); const now = Date.now(); @@ -145,7 +145,7 @@ describe('timeout handling', () => { const response = await requester.send({ ...timeoutRequest, connectTimeout: 2000, - url: 'http://localhost:1111/connection_timeout', + url: 'http://localhost:1113/connection_timeout', }); const now = Date.now(); @@ -161,7 +161,7 @@ describe('timeout handling', () => { const response = await requester.send({ ...timeoutRequest, responseTimeout: 2000, - url: 'http://localhost:1111', + url: 'http://localhost:1113', }); const now = Date.now(); @@ -176,7 +176,7 @@ describe('timeout handling', () => { const response = await requester.send({ ...timeoutRequest, responseTimeout: 3000, - url: 'http://localhost:1111', + url: 'http://localhost:1113', }); const now = Date.now(); @@ -190,7 +190,7 @@ describe('timeout handling', () => { const before = Date.now(); const response = await requester.send({ ...requestStub, - url: 'http://localhost:1111', + url: 'http://localhost:1113', responseTimeout: 6000, }); diff --git a/clients/algoliasearch-client-javascript/packages/requester-node-http/src/__tests__/node-http-requester.test.ts b/clients/algoliasearch-client-javascript/packages/requester-node-http/src/__tests__/node-http-requester.test.ts index 6a50ea5fa1..d5d827291b 100644 --- a/clients/algoliasearch-client-javascript/packages/requester-node-http/src/__tests__/node-http-requester.test.ts +++ b/clients/algoliasearch-client-javascript/packages/requester-node-http/src/__tests__/node-http-requester.test.ts @@ -186,7 +186,7 @@ describe('timeout handling', () => { const response = await requester.send({ ...timeoutRequest, connectTimeout: 1000, - url: 'http://localhost:1111/connection_timeout', + url: 'http://localhost:1112/connection_timeout', }); const now = Date.now(); @@ -201,7 +201,7 @@ describe('timeout handling', () => { const response = await requester.send({ ...timeoutRequest, connectTimeout: 2000, - url: 'http://localhost:1111/connection_timeout', + url: 'http://localhost:1112/connection_timeout', }); const now = Date.now(); @@ -217,7 +217,7 @@ describe('timeout handling', () => { const response = await requester.send({ ...timeoutRequest, responseTimeout: 2000, - url: 'http://localhost:1111', + url: 'http://localhost:1112', }); const now = Date.now(); @@ -232,7 +232,7 @@ describe('timeout handling', () => { const response = await requester.send({ ...timeoutRequest, responseTimeout: 3000, - url: 'http://localhost:1111', + url: 'http://localhost:1112', }); const now = Date.now(); @@ -246,7 +246,7 @@ describe('timeout handling', () => { const before = Date.now(); const response = await requester.send({ ...requestStub, - url: 'http://localhost:1111', + url: 'http://localhost:1112', responseTimeout: 6000, });