tests - increase timeout when running in CI (#182288)
parent
363a88dbaa
commit
424388032a
|
@ -131,7 +131,13 @@ async function runTestsInBrowser(testModules, browserType) {
|
|||
const page = await context.newPage();
|
||||
const target = url.pathToFileURL(path.join(__dirname, 'renderer.html'));
|
||||
if (argv.build) {
|
||||
target.search = `?build=true`;
|
||||
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||
target.search = `?build=true&ci=true`;
|
||||
} else {
|
||||
target.search = `?build=true`;
|
||||
}
|
||||
} else if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||
target.search = `?ci=true`;
|
||||
}
|
||||
|
||||
const emitter = new events.EventEmitter();
|
||||
|
|
|
@ -31,9 +31,12 @@
|
|||
}
|
||||
});
|
||||
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const isCI = urlParams.get('ci');
|
||||
|
||||
mocha.setup({
|
||||
ui: 'tdd',
|
||||
timeout: 5000
|
||||
timeout: isCI ? 30000 : 5000
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -42,7 +45,6 @@
|
|||
<script src="../../../out-build/vs/loader.js"></script>
|
||||
|
||||
<script>
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const isBuild = urlParams.get('build');
|
||||
|
||||
// configure loader
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
mocha.setup({
|
||||
ui: 'tdd',
|
||||
timeout: 5000,
|
||||
timeout: typeof process.env['BUILD_ARTIFACTSTAGINGDIRECTORY'] === 'string' ? 30000 : 5000,
|
||||
forbidOnly: typeof process.env['BUILD_ARTIFACTSTAGINGDIRECTORY'] === 'string' // disallow .only() when running on build machine
|
||||
});
|
||||
require('./renderer');
|
||||
|
|
Loading…
Reference in New Issue