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

Fix Flaky Retry Tests #9516

Merged
merged 2 commits into from
Jan 5, 2022
Merged

Fix Flaky Retry Tests #9516

merged 2 commits into from
Jan 5, 2022

Conversation

rosstimothy
Copy link
Contributor

@rosstimothy rosstimothy commented Dec 21, 2021

Tests Addressed in this PR:

  • github.com/gravitational/teleport/lib/service.TestTeleportProcess_reconnectToAuth
  • github.com/gravitational/teleport/lib/service.TestResourceWatcher_Backoff
  • github.com/gravitational/teleport/lib/cache.TestCache_Backoff

The Backoff/Reconnect tests now utilize FakeClock.BlockUntil to prevent advancing the clock until the underlying utils.Retry has called After.

@rosstimothy rosstimothy force-pushed the tross/flaky_tests branch 5 times, most recently from 05cdc1a to 0326c13 Compare December 31, 2021 20:56
@rosstimothy rosstimothy force-pushed the tross/flaky_tests branch 4 times, most recently from fa91777 to a2c3efe Compare January 4, 2022 16:17
@rosstimothy rosstimothy changed the title fix flaky tests Fix flaky retry tests Jan 4, 2022
@rosstimothy rosstimothy changed the title Fix flaky retry tests Fix Flaky Retry Tests Jan 4, 2022
@rosstimothy rosstimothy marked this pull request as ready for review January 4, 2022 16:19
@github-actions github-actions bot requested review from atburke and zmb3 January 4, 2022 16:19
@rosstimothy rosstimothy mentioned this pull request Jan 4, 2022
Addresses issues causing failures in TestCache_Backoff, TestTeleportProcess_reconnectToAuth
and TestResourceWatcher_Backoff. By utilizing FakeClock.BlockUntil tests ensure that the clock
will not be advanced until retry.After has been called.
@rosstimothy rosstimothy merged commit dbc039c into master Jan 5, 2022
@rosstimothy rosstimothy deleted the tross/flaky_tests branch January 5, 2022 17:33
rosstimothy added a commit that referenced this pull request Jan 11, 2022
rosstimothy added a commit that referenced this pull request Jan 11, 2022
* backport of #9133 to branch/v6.2
* add flay test fixes from  #9516
rosstimothy added a commit that referenced this pull request Jan 20, 2022
Fix flaky unit tests
Addresses issues causing failures in TestCache_Backoff, TestTeleportProcess_reconnectToAuth
and TestResourceWatcher_Backoff. By utilizing FakeClock.BlockUntil tests ensure that the clock
will not be advanced until retry.After has been called. Move retry duration channels to config in order to allow them to be buffered by tests.
rosstimothy added a commit that referenced this pull request Jan 20, 2022
Fix flaky unit tests
Addresses issues causing failures in TestCache_Backoff, TestTeleportProcess_reconnectToAuth
and TestResourceWatcher_Backoff. By utilizing FakeClock.BlockUntil tests ensure that the clock
will not be advanced until retry.After has been called. Move retry duration channels to config in order to allow them to be buffered by tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants