Skip to content

fix TestALPNProxyHTTPProxyBasicAuthDial flakiness#26650

Merged
GavinFrazar merged 1 commit intomasterfrom
gavinfrazar/fix-TestALPNProxyHTTPProxyBasicAuthDial-flakiness
May 22, 2023
Merged

fix TestALPNProxyHTTPProxyBasicAuthDial flakiness#26650
GavinFrazar merged 1 commit intomasterfrom
gavinfrazar/fix-TestALPNProxyHTTPProxyBasicAuthDial-flakiness

Conversation

@GavinFrazar
Copy link
Copy Markdown
Contributor

Fixes #14143

3rd time's the charm! I think the issue was that the test is setup to intentionally prevent a node from joining through an HTTP basic auth proxy when it has the wrong credentials, but the node only has 10 seconds to successfully join before the test code times it out. This meant it would fail the initial dial attempt, then the test gives it correct credentials and waits for it to join, but it only had 10 seconds to do all of that and join the cluster or the test would fail. I suspect the random failures were coming from backoff/jitter in dial attempts.

So I fixed it by stopping the node after verifying that it was unable to join, then setting correct HTTP basic auth credentials and starting the node again. This should allow the node to join on its first attempt to dial the cluster with good credentials and avoid running out the 10 second timeout due to random backoff/jitter.

I was able to reliably reproduce the original test's flakiness locally by reducing the 10 second timeout to 1 second. With this temporarily reduced timeout, I tried this PR's changes and failed to reproduce a test failure after 100 attempts with and without the race detector enabled. So I think I finally got this one fixed for good.

* stop the node before resetting http proxy auth credentials,
  then start the node again which succeeds immediately,
  so that the test doesn't time out after 10 seconds waiting
  for the node to join due to random backoff/jitter.
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from fspmarshall May 22, 2023 14:33
@GavinFrazar GavinFrazar added this pull request to the merge queue May 22, 2023
Merged via the queue into master with commit 2fbed44 May 22, 2023
@GavinFrazar GavinFrazar deleted the gavinfrazar/fix-TestALPNProxyHTTPProxyBasicAuthDial-flakiness branch May 22, 2023 18:18
@public-teleport-github-review-bot
Copy link
Copy Markdown

@GavinFrazar See the table below for backport results.

Branch Result
branch/v11 Create PR
branch/v12 Create PR
branch/v13 Create PR

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.

TestALPNProxyHTTPProxyBasicAuthDial flakiness

3 participants