Browse Source

ci: use longer mocha timeout on WOA testing (#23636)

Co-authored-by: John Kleinschmidt <[email protected]>
trop[bot] 4 years ago
parent
commit
4de54b412f
3 changed files with 6 additions and 2 deletions
  1. 1 0
      azure-pipelines-woa.yml
  2. 2 1
      spec-main/index.js
  3. 3 1
      spec/static/index.html

+ 1 - 0
azure-pipelines-woa.yml

@@ -71,6 +71,7 @@ steps:
     ELECTRON_TEST_RESULTS_DIR: junit
     MOCHA_MULTI_REPORTERS: 'mocha-junit-reporter, tap'
     MOCHA_REPORTER: mocha-multi-reporters
+    MOCHA_TIMEOUT: 120000
 
 - task: PublishTestResults@2
   displayName: 'Publish Test Results'

+ 2 - 1
spec-main/index.js

@@ -62,7 +62,8 @@ app.whenReady().then(() => {
   if (!process.env.MOCHA_REPORTER) {
     mocha.ui('bdd').reporter('tap');
   }
-  mocha.timeout(30000);
+  const mochaTimeout = process.env.MOCHA_TIMEOUT || 30000;
+  mocha.timeout(mochaTimeout);
 
   if (argv.grep) mocha.grep(argv.grep);
   if (argv.invert) mocha.invert();

+ 3 - 1
spec/static/index.html

@@ -41,7 +41,9 @@
   if (!process.env.MOCHA_REPORTER) {
     mocha.ui('bdd').reporter('tap')
   }
-  mocha.timeout(30000)
+
+  const mochaTimeout = process.env.MOCHA_TIMEOUT || 30000
+  mocha.timeout(mochaTimeout)
 
   const query = Mocha.utils.parseQuery(window.location.search || '')
   if (query.grep) mocha.grep(query.grep)