tests - increase timeout when running in CI (#182288)

pull/183010/head
Benjamin Pasero 2023-05-12 13:02:15 +02:00 committed by GitHub
parent 363a88dbaa
commit 424388032a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 4 deletions

View File

@ -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();

View File

@ -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

View File

@ -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');