Skip to content

Deflake lib/auth.TestRollback#53486

Merged
espadolini merged 1 commit intomasterfrom
espadolini/deflake-testrollback
Mar 27, 2025
Merged

Deflake lib/auth.TestRollback#53486
espadolini merged 1 commit intomasterfrom
espadolini/deflake-testrollback

Conversation

@espadolini
Copy link
Copy Markdown
Contributor

@espadolini espadolini commented Mar 27, 2025

After #52128 we've started taking just a little longer to update the cert pool for TLS connections on the auth, which has surfaced some flakiness in lib/auth.TestRollback (as per #50047) caused by assuming that a freshly created client right after a CA rotation phase change would instantly be able to connect. This PR fixes the flakiness.

Fixes #50047

@espadolini espadolini added no-changelog Indicates that a PR does not require a changelog entry backport/branch/v15 backport/branch/v17 labels Mar 27, 2025
Comment thread lib/auth/tls_test.go
_, err = newProxy.GetNodes(ctx, apidefaults.Namespace)
require.NoError(t, err)
require.EventuallyWithT(t, func(ct *assert.CollectT) {
_, err = testSrv.CloneClient(t, newProxy).GetNodes(ctx, apidefaults.Namespace)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be passing ct to CloneClient?

Suggested change
_, err = testSrv.CloneClient(t, newProxy).GetNodes(ctx, apidefaults.Namespace)
_, err = testSrv.CloneClient(ct, newProxy).GetNodes(ctx, apidefaults.Namespace)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, failing to create the cloned client should stop the test (it has no reason to fail), and, as part of its creation, a cleanup is added to the test, which is not something that CollectT supports.

Comment thread lib/auth/tls_test.go
@espadolini espadolini enabled auto-merge March 27, 2025 14:11
@espadolini espadolini added this pull request to the merge queue Mar 27, 2025
Merged via the queue into master with commit 70a0d18 Mar 27, 2025
47 checks passed
@espadolini espadolini deleted the espadolini/deflake-testrollback branch March 27, 2025 14:32
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@espadolini See the table below for backport results.

Branch Result
branch/v15 Create PR
branch/v16 Create PR
branch/v17 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/branch/v17 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.

TestRollback flakiness

3 participants