Skip to content

Commit

Permalink
Preventing false positive alarms of offline mode
Browse files Browse the repository at this point in the history
Signed-off-by: Vladyslav Zhukovskyi <vzhukovs@redhat.com>
  • Loading branch information
vzhukovs committed Feb 17, 2021
1 parent 5a51ca1 commit c2bcc6f
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions packages/core/src/browser/connection-status-service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,20 +174,6 @@ describe('frontend-connection-status', function (): void {
sinon.assert.calledOnce(pingSpy);
});

it.skip('should perform ping request after socket activity with twice delay', async () => {
timer.restore();
const frontendConnectionStatusService = testContainer.get<FrontendConnectionStatusService>(FrontendConnectionStatusService);
frontendConnectionStatusService['init']();
mockIncomingMessageActivityEmitter.fire(undefined);
expect(frontendConnectionStatusService.currentStatus).to.be.equal(ConnectionStatus.ONLINE);
sinon.assert.notCalled(pingSpy);
// next line should be uncommented after update sinonjs library at least to 5.1.0 version and pause
// should be removed then test can be safely included into suite
// timer.tickAsync(OFFLINE_TIMEOUT * 2.5);
await pause(OFFLINE_TIMEOUT * 2.5);
sinon.assert.calledTwice(pingSpy);
});

it('should not perform ping request before desired timeout', () => {
const frontendConnectionStatusService = testContainer.get<FrontendConnectionStatusService>(FrontendConnectionStatusService);
frontendConnectionStatusService['init']();
Expand Down

0 comments on commit c2bcc6f

Please sign in to comment.