Skip to content

Commit

Permalink
fix: fetchsockets timeout error during tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-yarmosh committed Oct 25, 2023
1 parent d4f3723 commit 5ba05e9
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 20 deletions.
48 changes: 31 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"newrelic": "^10.6.2",
"physical-cpu-count": "^2.0.0",
"rate-limiter-flexible": "^2.4.2",
"redis": "^4.6.10",
"redis": "^4.6.5",
"request-ip": "^3.3.0",
"semver": "^7.5.4",
"socket.io": "^4.7.2",
Expand Down
2 changes: 1 addition & 1 deletion test/tests/integration/health/health.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('Get health', () => {
});

beforeEach(() => {
sandbox = sinon.createSandbox({ useFakeTimers: { shouldAdvanceTime: true } });
sandbox = sinon.createSandbox({ useFakeTimers: true });
exitStub = sandbox.stub(process, 'exit');
});

Expand Down
2 changes: 1 addition & 1 deletion test/tests/integration/measurement/timeout-result.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('Timeout results', () => {
const cryptoRandomString = sinon.stub().returns('measurementid');

before(async () => {
sandbox = sinon.createSandbox({ useFakeTimers: { shouldAdvanceTime: true } });
sandbox = sinon.createSandbox({ useFakeTimers: true });
await td.replaceEsm('crypto-random-string', {}, cryptoRandomString);
await td.replaceEsm('../../../../src/lib/ip-ranges.ts', { getRegion: () => 'gcp-us-west4', populateMemList: () => Promise.resolve() });
({ getTestServer, addFakeProbe, deleteFakeProbe } = await import('../../../utils/server.js'));
Expand Down

0 comments on commit 5ba05e9

Please sign in to comment.