Try make terminal api tests less flaky in remote

This commit is contained in:
Daniel Imms
2025-01-21 05:41:40 -08:00
parent 830e5c32c0
commit 8cfb26560f

View File

@@ -26,6 +26,8 @@ import { assertNoRpc, poll } from '../utils';
await config.update('gpuAcceleration', 'off', ConfigurationTarget.Global);
// Disable env var relaunch for tests to prevent terminals relaunching themselves
await config.update('environmentChangesRelaunch', false, ConfigurationTarget.Global);
// Disable local echo in case it causes any problems in remote tests
await config.update('localEchoEnabled', "off", ConfigurationTarget.Global);
await config.update('shellIntegration.enabled', false);
});
@@ -761,14 +763,9 @@ import { assertNoRpc, poll } from '../utils';
data += sanitizeData(e.data);
}));
// Run both PowerShell and sh commands, errors don't matter we're just looking for
// the correct output
terminal.sendText('$env:A');
terminal.sendText('echo $A');
terminal.sendText('$env:B');
terminal.sendText('echo $B');
terminal.sendText('$env:C');
terminal.sendText('echo $C');
// Run sh commands, if this is ever enabled on Windows we would also want to run
// the pwsh equivalent
terminal.sendText('echo "$A $B $C');
// Poll for the echo results to show up
try {