Retry executeCommand integration test on failure

It's unclear how this happened and seems like a very rare flake.
This commit is contained in:
Daniel Imms
2025-01-08 09:16:51 -08:00
parent 62aabbc27e
commit 2bcd6c467e

View File

@@ -212,7 +212,12 @@ import { assertNoRpc } from '../utils';
await closeTerminalAsync(terminal);
});
test('executeCommand(executable, args)', async () => {
test('executeCommand(executable, args)', async function () {
// HACK: This test has flaked before where the `value` was `e`, not `echo hello`. After an
// investigation it's not clear how this happened, so in order to keep some of the value
// that the test adds, it will retry after a failure.
this.retries(3);
const { terminal, shellIntegration } = await createTerminalAndWaitForShellIntegration();
const { execution, endEvent } = executeCommandAsync(shellIntegration, 'echo', ['hello']);
const executionSync = await execution;