diff --git a/src/vs/platform/userDataSync/test/common/userDataSyncStoreService.test.ts b/src/vs/platform/userDataSync/test/common/userDataSyncStoreService.test.ts index 1d3051d85bec8014059c256e97eeb20139ec113a..e2d0de0820dabf0af5368f4954cf71e81d196408 100644 --- a/src/vs/platform/userDataSync/test/common/userDataSyncStoreService.test.ts +++ b/src/vs/platform/userDataSync/test/common/userDataSyncStoreService.test.ts @@ -333,38 +333,40 @@ suite('UserDataSyncRequestsSession', () => { }; test('too many requests are thrown when limit exceeded', async () => { - const testObject = new RequestsSession(1, 100, requestService, NullTelemetryService); + const testObject = new RequestsSession(1, 500, requestService, NullTelemetryService); await testObject.request({}, CancellationToken.None); try { await testObject.request({}, CancellationToken.None); - assert.fail('Should fail with limit exceeded'); } catch (error) { assert.ok(error instanceof UserDataSyncStoreError); assert.equal((error).code, UserDataSyncErrorCode.LocalTooManyRequests); + return; } + assert.fail('Should fail with limit exceeded'); }); test('requests are handled after session is expired', async () => { - const testObject = new RequestsSession(1, 100, requestService, NullTelemetryService); + const testObject = new RequestsSession(1, 500, requestService, NullTelemetryService); await testObject.request({}, CancellationToken.None); - await timeout(150); + await timeout(600); await testObject.request({}, CancellationToken.None); }); test('too many requests are thrown after session is expired', async () => { - const testObject = new RequestsSession(1, 100, requestService, NullTelemetryService); + const testObject = new RequestsSession(1, 500, requestService, NullTelemetryService); await testObject.request({}, CancellationToken.None); - await timeout(150); + await timeout(600); await testObject.request({}, CancellationToken.None); try { await testObject.request({}, CancellationToken.None); - assert.fail('Should fail with limit exceeded'); } catch (error) { assert.ok(error instanceof UserDataSyncStoreError); assert.equal((error).code, UserDataSyncErrorCode.LocalTooManyRequests); + return; } + assert.fail('Should fail with limit exceeded'); }); });