From 1ac3fd25c97728224a2eac9e86a632fe0ed01b6e Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Fri, 29 Sep 2017 00:39:40 +0200 Subject: [PATCH] chore: remove screenshot timeout check (#7206) Removes the screenshot timeout check, which will cancel the screenshot diff if the last action took longer than 6 minutes. Travis CI will automatically cancel the job if there was no console output for 10 minutes. --- tools/gulp/tasks/screenshots.ts | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/tools/gulp/tasks/screenshots.ts b/tools/gulp/tasks/screenshots.ts index e7475fc8d15..fd5ffbd1fff 100644 --- a/tools/gulp/tasks/screenshots.ts +++ b/tools/gulp/tasks/screenshots.ts @@ -34,12 +34,6 @@ const FIREBASE_IMAGE = `${TEMP_FOLDER}/screenshot/images`; const FIREBASE_DATA_GOLDENS = `screenshot/goldens`; const FIREBASE_STORAGE_GOLDENS = 'goldens'; -/** Time in ms until the process will be exited if the last action took too long (6 minutes). */ -const lastActionTimeout = 1000 * 60 * 6; - -/** Time in ms that specifies how often the last action should be checked (45 seconds). */ -const lastActionRefreshInterval = 1000 * 45; - /** Task which upload screenshots generated from e2e test. */ task('screenshots', () => { const prNumber = process.env['TRAVIS_PULL_REQUEST']; @@ -52,16 +46,6 @@ task('screenshots', () => { const database = firebaseApp.database(); let lastActionTime = Date.now(); - // If the last action of the task takes longer than 6 minutes, close the firebase connection. - const timeoutId = setInterval(() => { - if (lastActionTime + lastActionTimeout <= Date.now()) { - clearTimeout(timeoutId); - console.error('Last action for screenshot tests did not finish in ' + - (lastActionTimeout / 1000 / 60) + ' minutes. Closing Firebase connection...'); - return firebaseApp.delete().then(() => process.exit(1)); - } - }, lastActionRefreshInterval); - console.log(` Starting screenshots task with results from e2e task...`); return uploadTravisJobInfo(database, prNumber) @@ -89,13 +73,11 @@ task('screenshots', () => { .then(() => { console.log(` Uploading results done (took ${Date.now() - lastActionTime}ms)`); firebaseApp.delete(); - clearTimeout(timeoutId); }) .catch((err: any) => { console.error(` Screenshot tests encountered an error!`); console.error(err); firebaseApp.delete(); - clearTimeout(timeoutId); }); } });