Skip to content

Commit 1ac3fd2

Browse files
devversionjelbourn
authored andcommitted
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.
1 parent 3982cc8 commit 1ac3fd2

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

tools/gulp/tasks/screenshots.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,6 @@ const FIREBASE_IMAGE = `${TEMP_FOLDER}/screenshot/images`;
3434
const FIREBASE_DATA_GOLDENS = `screenshot/goldens`;
3535
const FIREBASE_STORAGE_GOLDENS = 'goldens';
3636

37-
/** Time in ms until the process will be exited if the last action took too long (6 minutes). */
38-
const lastActionTimeout = 1000 * 60 * 6;
39-
40-
/** Time in ms that specifies how often the last action should be checked (45 seconds). */
41-
const lastActionRefreshInterval = 1000 * 45;
42-
4337
/** Task which upload screenshots generated from e2e test. */
4438
task('screenshots', () => {
4539
const prNumber = process.env['TRAVIS_PULL_REQUEST'];
@@ -52,16 +46,6 @@ task('screenshots', () => {
5246
const database = firebaseApp.database();
5347
let lastActionTime = Date.now();
5448

55-
// If the last action of the task takes longer than 6 minutes, close the firebase connection.
56-
const timeoutId = setInterval(() => {
57-
if (lastActionTime + lastActionTimeout <= Date.now()) {
58-
clearTimeout(timeoutId);
59-
console.error('Last action for screenshot tests did not finish in ' +
60-
(lastActionTimeout / 1000 / 60) + ' minutes. Closing Firebase connection...');
61-
return firebaseApp.delete().then(() => process.exit(1));
62-
}
63-
}, lastActionRefreshInterval);
64-
6549
console.log(` Starting screenshots task with results from e2e task...`);
6650

6751
return uploadTravisJobInfo(database, prNumber)
@@ -89,13 +73,11 @@ task('screenshots', () => {
8973
.then(() => {
9074
console.log(` Uploading results done (took ${Date.now() - lastActionTime}ms)`);
9175
firebaseApp.delete();
92-
clearTimeout(timeoutId);
9376
})
9477
.catch((err: any) => {
9578
console.error(` Screenshot tests encountered an error!`);
9679
console.error(err);
9780
firebaseApp.delete();
98-
clearTimeout(timeoutId);
9981
});
10082
}
10183
});

0 commit comments

Comments
 (0)