-
Notifications
You must be signed in to change notification settings - Fork 3k
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] Add sleep cooldowns to e2e tests #30635
Conversation
@aldo-expensify Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
const coolDownLogs = Logger.progressInfo(`Cooling down for ${config.COOL_DOWN / 1000}s`); | ||
coolDownLogs.updateText(`Cooling down for ${config.COOL_DOWN / 1000}s`); | ||
|
||
await sleep(config.BOOT_COOL_DOWN); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having the cooldown right at the beginning should hopefully lower the chances of heat throttling from the previous run (which we have no control over and will be a completely different AWS DF customer/app). It also gives the time to cool down between test suites.
await killApp('android', config.APP_PACKAGE); | ||
|
||
testLog.updateText(`Coolin down phone 🧊 ${config.SUITE_COOL_DOWN / 1000}s\n`); | ||
await sleep(config.SUITE_COOL_DOWN); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the cool down between booting the app again, had the side-effect of actually causing a cold boot, which increased TTI/bundle load JS times significantly but also stabilized standard deviation.
Co-authored-by: Aldo Canepa Garay <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coming from here this seems to have helped so going to merge this
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.95-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.95-9 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.96-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.96-15 🚀
|
Details
We are still seeing potentially flaky results on the e2e tests. Our tests on a local device, have shown there is a lot of variance due to thermal throttling. We also discovered that killing the app and immediately starting it again would cause a warm boot instead of a cold boot, which seems to skew the numbers and add a greater variance to the results.
Before doing another major refactoring of the tests, we decided to give sleep cooldowns a try.
a) Add a large cooldown period at the beginning of each test suite, such as limiting the variance of heat build-up from our own runs but at the same time from any previous run on the device in the device farm.
b) A smaller cooldown between tests should help the phone clear caches and do a cold boot, thus eliminating caching variance and limiting the effects of thermal throttling.
In our tests, these cooldowns cut down the standard deviation of the tests in half. So we expect to see flakiness on the production system also go down. As a side note, the reported TTI/bundle load time also went up, but this is an artifact of previously measuring warm boots, instead of cold boots.
Fixed Issues
$
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop