Make env var tests more resilient to other terminal events

This commit is contained in:
Daniel Imms
2021-02-22 04:04:48 -08:00
parent d2a6dea323
commit ce7cd0abac

View File

@@ -19,7 +19,7 @@ import { assertNoRpc } from '../utils';
extensionContext = (global as any).testExtensionContext;
const config = workspace.getConfiguration('terminal.integrated');
// Disable conpty because of the hang issue https://github.com/microsoft/vscode/issues/71966
// Disable conpty in integration tests because of https://github.com/microsoft/vscode/issues/76548
await config.update('windowsEnableConpty', false, ConfigurationTarget.Global);
// Disable exit alerts as tests may trigger then and we're not testing the notifications
await config.update('showExitAlert', false, ConfigurationTarget.Global);
@@ -682,10 +682,7 @@ import { assertNoRpc } from '../utils';
'~c2~'
];
disposables.push(window.onDidWriteTerminalData(e => {
try {
equal(terminal, e.terminal);
} catch (e) {
done(e);
if (terminal !== e.terminal) {
return;
}
// Multiple expected could show up in the same data event
@@ -727,10 +724,7 @@ import { assertNoRpc } from '../utils';
'~b1~'
];
disposables.push(window.onDidWriteTerminalData(e => {
try {
equal(terminal, e.terminal);
} catch (e) {
done(e);
if (terminal !== e.terminal) {
return;
}
// Multiple expected could show up in the same data event
@@ -769,10 +763,7 @@ import { assertNoRpc } from '../utils';
'~b2~'
];
disposables.push(window.onDidWriteTerminalData(e => {
try {
equal(terminal, e.terminal);
} catch (e) {
done(e);
if (terminal !== e.terminal) {
return;
}
// Multiple expected could show up in the same data event