-
Notifications
You must be signed in to change notification settings - Fork 364
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
test: Attempt to fix DBaaS unit test flake #11332
test: Attempt to fix DBaaS unit test flake #11332
Conversation
@@ -128,132 +128,142 @@ export const DatabaseBackups = (props: Props) => { | |||
setSelectedTime(null); | |||
}; | |||
|
|||
return isDefaultDatabase ? ( |
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.
The only thing I changed here was this ternary. I change it to an early return to make this component more readable.
expect(getByTestId(loadingTestId)).toBeInTheDocument(); | ||
await waitForElementToBeRemoved(getByTestId(loadingTestId)); |
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.
Rather than waiting for the loading state to go away and immediately asserting things, I updated this so that each assertion uses a find
. This makes the test more resilient to inconsistent rendering behavior, which is what I suspect is happening in DatabaseResize
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.
I just tried to simplify this test as much as possible by removing some waitFor
s and find
s. The updated test still does pretty much the same thing (except asset the loading state).
Coverage Report: ✅ |
Cloud Manager UI test results🔺 1 failing test on test run #2 ↗︎
Details
TroubleshootingUse this command to re-run the failing tests: yarn cy:run -s "cypress/e2e/core/stackscripts/create-stackscripts.spec.ts" |
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.
Thanks @bnussman-akamai! I couldn't confirm the stability of the tests (they fail consistently for me in develop and against this branch, presumably performance issues with my machine), but reviewed the code and everything looked good to me
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.
Thank you - passing locally ✅
Cloud Manager E2E Run #6887
Run Properties:
|
Project |
Cloud Manager E2E
|
Branch Review |
develop
|
Run status |
Failed #6887
|
Run duration | 30m 27s |
Commit |
890e90e066: test: Attempt to fix DBaaS unit test flake (#11332)
|
Committer | Banks Nussman |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
2
|
Flaky |
2
|
Pending |
2
|
Skipped |
0
|
Passing |
453
|
View all changes introduced in this branch ↗︎ |
Tests for review
rebuild-linode.spec.ts • 1 failed test
Test | Artifacts | |
---|---|---|
rebuild linode > rebuilds a linode from Account StackScript |
Screenshots
Video
|
linode-config.spec.ts • 1 failed test
Test | Artifacts | |
---|---|---|
Linode Config management > End-to-End > Clones a config |
Screenshots
Video
|
resize-linode.spec.ts • 1 flaky test
Test | Artifacts | |
---|---|---|
resize linode > resizes a linode by increasing size: cold migration |
Screenshots
Video
|
update-linode-labels.spec.ts • 1 flaky test
Test | Artifacts | |
---|---|---|
update linode label > updates a linode label from details page |
Screenshots
Video
|
Description 📝
How to test 🧪
yarn test DatabaseResize
yarn test DatabaseBackups
Warning
The code coverage check that uses
develop
as the base branch may still fail because it does not have these changesAuthor Checklists
As an Author, to speed up the review process, I considered 🤔
👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support
As an Author, before moving this PR from Draft to Open, I confirmed ✅