Skip to content

Fix tsh/common test timeout by sharing kube cluster fixtures - #69625

Draft
jakealti wants to merge 6 commits into
masterfrom
jakealti/fix-tsh-test-timeout
Draft

Fix tsh/common test timeout by sharing kube cluster fixtures#69625
jakealti wants to merge 6 commits into
masterfrom
jakealti/fix-tsh-test-timeout

Conversation

@jakealti

Copy link
Copy Markdown
Contributor

The tests in tool/tsh/common were timing out in CI.

When a test changes, CI runs it 100 times to check for flakiness.
That job has a 10 minute limit.
TestKube and TestKubeLogin start three Teleport clusters between them,
and they did it on every one of the 100 runs.
So once a test with this setup was added, the job ran out of time.

Now the clusters are started once and reused.
There are two of them, one for each proxy mode the tests cover.

TestKube + TestKubeLogin on my machine, with the same flags CI uses
(-race -shuffle on):

before after
-count 1 20.5s 16.7s
-count 10 139.5s 24.3s

Before, each extra run added about 13 seconds. Now it adds less than 1.
That takes 100 runs from roughly 20 minutes down to under 2.

Only tests changed. No change in behavior.

@jakealti jakealti added no-changelog Indicates that a PR does not require a changelog entry no-test-plan Bypasses the test plan validation bot labels Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Indicates that a PR does not require a changelog entry no-test-plan Bypasses the test plan validation bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant