Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NoQA] e2e tests: continue when test is hanging #36025

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions tests/e2e/testRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,16 @@ const runTests = async () => {
mockNetwork: true,
});

const onError = (e) => {
testLog.done();
if (i === 0) {
// If the error happened on the first test run, the test is broken
// and we should not continue running it
throw e;
}
console.error(e);
};

// Wait for a test to finish by waiting on its done call to the http server
try {
await withFailTimeout(
Expand All @@ -352,9 +362,7 @@ const runTests = async () => {
progressText,
);
} catch (e) {
// When we fail due to a timeout it's interesting to take a screenshot of the emulator to see whats going on
testLog.done();
throw e; // Rethrow to abort execution
onError(e);
}

Logger.log('Killing main app');
Expand All @@ -378,9 +386,7 @@ const runTests = async () => {
progressText,
);
} catch (e) {
// When we fail due to a timeout it's interesting to take a screenshot of the emulator to see whats going on
testLog.done();
throw e; // Rethrow to abort execution
onError(e);
}
}
testLog.done();
Expand Down
Loading