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

[v14] Add RunWhileLockedRetryInterval setting to TestAuthServer #40221

Merged
merged 2 commits into from
Apr 10, 2024

Conversation

tigrato
Copy link
Contributor

@tigrato tigrato commented Apr 4, 2024

Backport #40159 to branch/v14

This PR adds the `RunWhileLockedRetryInterval` setting to TestAuthServer
so we can disable retry waiting timeout when using fake clocks and
`RunWhileLocked`.

Signed-off-by: Tiago Silva <[email protected]>
@tigrato tigrato added the no-changelog Indicates that a PR does not require a changelog entry label Apr 4, 2024
@github-actions github-actions bot requested review from hugoShaka and jakule April 4, 2024 18:26
…` for tests (#40083)

* Add a way to configure the `RunWhileLocked.RunWhileLockedRetryInterval` for tests

This PR adds a way to bypass the
`cfg.Backend.Clock().After(cfg.RetryInterval)` call within
`backend.AcquireLock` when using the fake clock.

When multiple parallel calls try to acquire the same lock,
`backend.AcquireLock` tries to sleep before retrying. When using the
fake clock this operation isn't reliable enough when using
`clock.Advance` so we are adding a way to configure it with negative
values - i.e. retry immidately - for testing purposes.

Signed-off-by: Tiago Silva <[email protected]>

* update docs

* drop testing.Testing usage

---------

Signed-off-by: Tiago Silva <[email protected]>
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from jakule April 10, 2024 09:46
@tigrato tigrato added this pull request to the merge queue Apr 10, 2024
Merged via the queue into branch/v14 with commit 08e3667 Apr 10, 2024
24 checks passed
@tigrato tigrato deleted the bot/backport-40159-branch/v14 branch April 10, 2024 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport no-changelog Indicates that a PR does not require a changelog entry size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants