-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Wait longer to reduce flakiness of TestNodeStateManager #27051
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
base: master
Are you sure you want to change the base?
Wait longer to reduce flakiness of TestNodeStateManager #27051
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideExtended test grace periods and adjusted await timeouts in TestNodeStateManager to reduce flakiness by increasing the grace period constant and updating related await durations and comments. File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
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.
Pull Request Overview
This PR increases timeout values in the TestNodeStateManager test class to reduce test flakiness. The changes adjust the grace period from 200ms to 1000ms and proportionally increase the maximum wait times in test assertions to ensure more reliable test execution.
Key Changes:
- Increased
GRACE_PERIOD_MILLISconstant from 200 to 1000 - Updated timeout values in test methods to account for the longer grace period
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| // here wait for at least 2 grace periods, and add some slack to reduce test flakyness | ||
| await().atMost(4 * GRACE_PERIOD_MILLIS + 100, MILLISECONDS).until(() -> shutdownAction.isShuttingDown()); | ||
| // here wait for at least 4 grace periods, and add some slack to reduce test flakyness |
Copilot
AI
Oct 22, 2025
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.
Corrected spelling of 'flakyness' to 'flakiness'.
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.
good idea
| assertThat(nodeStateManager.getServerState()).isEqualTo(NodeState.SHUTTING_DOWN); | ||
|
|
||
| // here wait for at least 2 grace periods, and add some slack to reduce test flakyness | ||
| // here wait for at least 4 grace periods, and add some slack to reduce test flakyness |
Copilot
AI
Oct 22, 2025
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.
Corrected spelling of 'flakyness' to 'flakiness'.
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.
keen eye
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.
good idea
|
fff7cb0 to
5bef456
Compare
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.
you have red anyway, so why don't you fix typoes too?
|
|
||
| // here wait for at least 2 grace periods, and add some slack to reduce test flakyness | ||
| await().atMost(4 * GRACE_PERIOD_MILLIS + 100, MILLISECONDS).until(() -> shutdownAction.isShuttingDown()); | ||
| // here wait for at least 4 grace periods, and add some slack to reduce test flakyness |
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.
good idea
| assertThat(nodeStateManager.getServerState()).isEqualTo(NodeState.SHUTTING_DOWN); | ||
|
|
||
| // here wait for at least 2 grace periods, and add some slack to reduce test flakyness | ||
| // here wait for at least 4 grace periods, and add some slack to reduce test flakyness |
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.
good idea
More info at https://trino.io/development/process#release-note -->
Release notes
(x) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:
Summary by Sourcery
Adjust test timing in TestNodeStateManager to reduce flakiness by increasing the grace period and extending await timeouts
Tests: