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] [DEV] E2e/increase reliability #30484

Merged
merged 5 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ package-lock.json
*.css
*.scss
*.md
# We need to modify the import here specifically, hence we disable prettier to get rid of the sorted imports
src/libs/E2E/reactNativeLaunchingTest.js
3 changes: 1 addition & 2 deletions src/libs/E2E/reactNativeLaunchingTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/
import * as Metrics from '@libs/Metrics';
import Performance from '@libs/Performance';
import '../../../index';
import E2EConfig from '../../../tests/e2e/config';
import E2EClient from './client';

Expand Down Expand Up @@ -65,5 +64,5 @@ E2EClient.getTestConfig()

// start the usual app
Performance.markStart('regularAppStart');

import '../../../index';
Performance.markEnd('regularAppStart');
2 changes: 1 addition & 1 deletion tests/e2e/compare/compare.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const PROBABILITY_CONSIDERED_SIGNIFICANCE = 0.02;
* This is additional filter, in addition to probability threshold above.
* Too small duration difference might be result of measurement grain of 1 ms.
*/
const DURATION_DIFF_THRESHOLD_SIGNIFICANCE = 50;
const DURATION_DIFF_THRESHOLD_SIGNIFICANCE = 100;

const loadFile = (path) =>
fs.readFile(path, 'utf8').then((data) => {
Expand Down
5 changes: 4 additions & 1 deletion tests/e2e/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
SERVER_PORT: 4723,

// The amount of times a test should be executed for average performance metrics
RUNS: 60,
RUNS: 80,

DEFAULT_BASELINE_BRANCH: 'main',

Expand All @@ -46,6 +46,9 @@ module.exports = {
// The time in milliseconds after which an operation fails due to timeout
INTERACTION_TIMEOUT: 300000,

// Period we wait between each test runs, to let the device cool down
COOL_DOWN: 90 * 1000,

TEST_NAMES,

/**
Expand Down
9 changes: 9 additions & 0 deletions tests/e2e/testRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,15 @@ const runTests = async () => {
}
}
testLog.done();

// If we still have tests add a cool down period
if (testIndex < numOfTests - 1) {
const coolDownLogs = Logger.progressInfo(`Cooling down for ${config.COOL_DOWN / 1000}s`);
coolDownLogs.updateText(`Cooling down for ${config.COOL_DOWN / 1000}s`);
// eslint-disable-next-line no-loop-func
await new Promise((resolve) => setTimeout(resolve, config.COOL_DOWN));
coolDownLogs.done();
}
}

// Calculate statistics and write them to our work file
Expand Down
Loading