Skip to content

Commit ad1dcce

Browse files
committed
test/integration/goDebug.test.ts: accept 'exception' as stopped reason
With the merge of go-delve/delve#2444 the stopped reason for errors is now exception in order to support exception info requests. Change-Id: Ica2240837d8ef5c7de3e56e6f3030a1f0d1dcdf1 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/320509 Trust: Suzy Mueller <[email protected]> Run-TryBot: Suzy Mueller <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
1 parent c54f5e6 commit ad1dcce

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

test/integration/goDebug.test.ts

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,20 +1266,15 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
12661266
};
12671267
const debugConfig = await initializeDebugConfig(config);
12681268
await Promise.all([
1269-
dc
1270-
.waitForEvent('initialized')
1271-
.then(() => {
1272-
return dc.setExceptionBreakpointsRequest({
1273-
filters: ['all']
1274-
});
1275-
})
1276-
.then(() => {
1277-
return dc.configurationDoneRequest();
1278-
}),
1279-
1269+
dc.configurationSequence(),
12801270
dc.launch(debugConfig),
1281-
1282-
dc.assertStoppedLocation('panic', {})
1271+
dc.waitForEvent('stopped').then((event) => {
1272+
assert(
1273+
event.body.reason === 'runtime error' ||
1274+
event.body.reason === 'panic' ||
1275+
event.body.reason === 'exception'
1276+
);
1277+
})
12831278
]);
12841279
});
12851280

@@ -1303,7 +1298,11 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
13031298
dc.configurationSequence(),
13041299
dc.launch(debugConfig),
13051300
dc.waitForEvent('stopped').then((event) => {
1306-
assert(event.body.reason === 'runtime error' || event.body.reason === 'panic');
1301+
assert(
1302+
event.body.reason === 'runtime error' ||
1303+
event.body.reason === 'panic' ||
1304+
event.body.reason === 'exception'
1305+
);
13071306
})
13081307
]);
13091308
});
@@ -1331,7 +1330,11 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
13311330
await Promise.all([
13321331
dc.nextRequest({ threadId: 1 }),
13331332
dc.waitForEvent('stopped').then((event) => {
1334-
assert(event.body.reason === 'runtime error' || event.body.reason === 'panic');
1333+
assert(
1334+
event.body.reason === 'runtime error' ||
1335+
event.body.reason === 'panic' ||
1336+
event.body.reason === 'exception'
1337+
);
13351338
})
13361339
]);
13371340
});

0 commit comments

Comments
 (0)