Retry tests more aggressively on windows
There are some flaky CI test failures that manifest only as a message
like
[main 2020-06-01T16:09:47.671Z] [VS Code]: render process crashed!
(and only afaict on windows) which I am not sure how to detect at the
moment. If that message is occurring in the exception caught at this
stage, we can check for it.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user