Skip to content

Increase expiration timeouts on leases to avoid races in NoopBackend#9600

Merged
sgmiller merged 5 commits into
masterfrom
race-fix
Jul 29, 2020
Merged

Increase expiration timeouts on leases to avoid races in NoopBackend#9600
sgmiller merged 5 commits into
masterfrom
race-fix

Conversation

@sgmiller
Copy link
Copy Markdown
Collaborator

NoopBackend is primed with a canned Response for many of the unit tests
in expiration_test.go. If on a slow machine a lease expires, the revocation
will trigger a request to the backend, which may race on the population
of the same Response instance being used by the unit test.

@sgmiller sgmiller requested a review from ncabatoff July 27, 2020 14:51
@ncabatoff
Copy link
Copy Markdown
Collaborator

Why such a modest increase? I didn't look very closely, but I didn't see any behaviour in these tests that rely on it being a short expiry. TestExpiration_RenewToken seems similar in spirit to TestExpiration_Renew and it uses an hour.

I would go up to at least 1s.

@sgmiller
Copy link
Copy Markdown
Collaborator Author

Sure, can do. I just assumed that if this was a rarely failing test, this would make it 2.5x less likely. But happy to increase further since that doesn't actually slow the test.

@sgmiller sgmiller merged commit db841d1 into master Jul 29, 2020
@sgmiller sgmiller deleted the race-fix branch July 29, 2020 15:13
sapk pushed a commit to sapk-fork/vault that referenced this pull request Oct 6, 2025
…shicorp#9600) (hashicorp#9758)

Co-authored-by: Bianca <48203644+biazmoreira@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants