Merge pull request #422 from jcreedcmu/jcreed/retry-harder-on-windows

Chore: Retry tests more aggressively on windows
This commit is contained in:
jcreedcmu
2020-06-01 12:39:51 -04:00
committed by GitHub

View File

@@ -1,4 +1,5 @@
import * as path from 'path';
import * as os from 'os';
import { runTests } from 'vscode-test';
// A subset of the fields in TestOptions from vscode-test, which we
@@ -26,6 +27,11 @@ async function runTestsWithRetryOnSegfault(suite: Suite, tries: number): Promise
if (t < tries - 1)
console.error('Retrying...');
}
else if (os.platform() === 'win32') {
console.error(`Test runner caught exception (${err})`);
if (t < tries - 1)
console.error('Retrying...');
}
else {
throw err;
}