Skip to content

Commit

Permalink
Make remote debugging unit tests more robust
Browse files Browse the repository at this point in the history
Fixes #1424
  • Loading branch information
DonJayamanne authored Apr 17, 2018
1 parent 95b38cb commit bd36aeb
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/test/debugger/attach.ptvsd.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ suite('Attach Debugger - Experimental', () => {
debugClient.waitForEvent('initialized')
]);

await debugClient.configurationDoneRequest();

const stdOutPromise = debugClient.assertOutput('stdout', 'this is stdout');
const stdErrPromise = debugClient.assertOutput('stderr', 'this is stderr');

Expand All @@ -112,22 +110,23 @@ suite('Attach Debugger - Experimental', () => {
source: { path: breakpointLocation.path }
});
const exceptionBreakpointPromise = debugClient.setExceptionBreakpointsRequest({ filters: [] });
const breakpointStoppedPromise = debugClient.assertStoppedLocation('breakpoint', breakpointLocation);
await Promise.all([
breakpointPromise,
exceptionBreakpointPromise,
stdOutPromise, stdErrPromise
breakpointPromise, exceptionBreakpointPromise,
debugClient.configurationDoneRequest(), debugClient.threadsRequest(),
stdOutPromise, stdErrPromise,
breakpointStoppedPromise
]);

await debugClient.assertStoppedLocation('breakpoint', breakpointLocation);

await Promise.all([
continueDebugging(debugClient),
debugClient.assertOutput('stdout', 'this is print'),
debugClient.waitForEvent('exited'),
debugClient.waitForEvent('terminated')
]);
}
test('Confirm we are able to attach to a running program', async () => {
test('Confirm we are able to attach to a running program', async function () {
this.retries(0);
await testAttachingToRemoteProcess(path.dirname(fileToDebug), path.dirname(fileToDebug), IS_WINDOWS);
});
test('Confirm local and remote paths are translated', async () => {
Expand Down

0 comments on commit bd36aeb

Please sign in to comment.