Skip to content

Commit e9a8dd5

Browse files
authored
remove duplicates from test_ids array (#21347)
this will partially remediate #21339 in regards to the duplicate IDs being run.
1 parent f148139 commit e9a8dd5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/client/testing/testController/workspaceTestAdapter.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export class WorkspaceTestAdapter {
8383

8484
let rawTestExecData;
8585
const testCaseNodes: TestItem[] = [];
86-
const testCaseIds: string[] = [];
86+
const testCaseIdsSet = new Set<string>();
8787
try {
8888
// first fetch all the individual test Items that we necessarily want
8989
includes.forEach((t) => {
@@ -95,10 +95,10 @@ export class WorkspaceTestAdapter {
9595
runInstance.started(node); // do the vscode ui test item start here before runtest
9696
const runId = this.vsIdToRunId.get(node.id);
9797
if (runId) {
98-
testCaseIds.push(runId);
98+
testCaseIdsSet.add(runId);
9999
}
100100
});
101-
101+
const testCaseIds = Array.from(testCaseIdsSet);
102102
// ** execution factory only defined for new rewrite way
103103
if (executionFactory !== undefined) {
104104
rawTestExecData = await this.executionAdapter.runTests(

0 commit comments

Comments
 (0)