Don't allow multiple tasks runs to start at once

Fixes #118238
This commit is contained in:
Alex Ross
2021-04-23 17:02:58 +02:00
parent 9a978d2f31
commit 876dd2782a
2 changed files with 9 additions and 3 deletions

View File

@@ -131,6 +131,7 @@ import { assertNoRpc } from '../utils';
suite('CustomExecution', () => {
test('task should start and shutdown successfully', async () => {
window.terminals.forEach(terminal => terminal.dispose());
interface CustomTestingTaskDefinition extends TaskDefinition {
/**
* One of the task properties. This can be used to customize the task in the tasks.json
@@ -203,7 +204,10 @@ import { assertNoRpc } from '../utils';
// Dispose the terminal
await new Promise<void>(r => {
disposables.push(window.onDidCloseTerminal(() => {
disposables.push(window.onDidCloseTerminal((e) => {
if (e !== terminal) {
return;
}
assert.strictEqual(testOrder, TestOrder.TerminalWritten);
testOrder = TestOrder.TerminalClosed;
// Pseudoterminal.close should have fired by now, additionally we want