Skip to content

Commit

Permalink
Increase timeout on Windows to 25s in previously missed locations
Browse files Browse the repository at this point in the history
Most of the timeouts for tests are the mocha timeouts, but DebugClient
has its own timeout values. This change synchronizes those values.

This increased timeout is specifically needed for the attachRemote
test which takes more than 5 seconds to do the initial connection
on the GitHub actions build regularly.

This is a follow up to commit 3708cea
part of #222
  • Loading branch information
jonahgraham committed Jan 24, 2023
1 parent e9cd850 commit e1a1f79
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .mocharc-windows-ci.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"//": "This timeout should match what is in CdtDebugClient constructor",
"timeout": "25000"
}
1 change: 1 addition & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"//": "This timeout should match what is in CdtDebugClient constructor",
"timeout": "5000"
}
3 changes: 3 additions & 0 deletions src/integration-tests/debugClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { DebugClient } from '@vscode/debugadapter-testsupport';
import { DebugProtocol } from '@vscode/debugprotocol';
import * as path from 'path';
import { defaultAdapter } from './utils';
import * as os from 'os';

export type ReverseRequestHandler<
A = any,
Expand Down Expand Up @@ -51,6 +52,8 @@ export class CdtDebugClient extends DebugClient {
if (extraArgs) {
this._cdt_args.push(...extraArgs);
}
// These timeouts should match what is in .mocharc.json and .mocharc-windows-ci.json
this.defaultTimeout = os.platform() === 'win32' ? 25000 : 5000;
}

/**
Expand Down

0 comments on commit e1a1f79

Please sign in to comment.