Skip to content

chore: integration test improvements#61615

Merged
rosstimothy merged 1 commit intomasterfrom
tross/integration_tests
Nov 21, 2025
Merged

chore: integration test improvements#61615
rosstimothy merged 1 commit intomasterfrom
tross/integration_tests

Conversation

@rosstimothy
Copy link
Copy Markdown
Contributor

@rosstimothy rosstimothy commented Nov 20, 2025

The changes here are meant to reduce resources consumed by integration tests and eliminate the footgun of connecting to a host before its been populated in the appropriate caches.

(integrationTestSuite) defaultServiceConfig now disables more services by default. Host user creation, the Web UI and Web Service, and the Database Proxy are all now turned off by default. The tests that require them can opt into turning them on.

(TeleInstance) Start now blocks until the processes SSH server is present in caches before returning. Most tests were already calling this manually after Start, however, not all of them were. This is frequently forgotten in new tests and causes flakes if client connections are attempted as soon as Start returns. There are still cases where calling WaitForNodeCount directly applies - tests that spin up additional nodes or tests that create nodes in a leaf cluster.

context.Background was also replaced with t.Context in some places.

@rosstimothy rosstimothy force-pushed the tross/integration_tests branch 9 times, most recently from 0d76ee5 to 6012ab5 Compare November 20, 2025 21:34
The changes here are meant to reduce resources consumed by
integration tests and eliminate the footgun of connecting to
a host before its been populated in the appropriate caches.

`(integrationTestSuite) defaultServiceConfig` now disables more services
by default. Host user creation, the Web UI and Web Service, and the
Database Proxy are all now turned off by default. The tests that require
them can opt into turning them on.

`(TeleInstance) Start` now blocks until the processes SSH server is present
in caches before returning. Most tests were already calling this manually
after Start, however, not all of them were. This is frequently forgotten
in new tests and causes flakes if client connections are attempted as
soon as Start returns. There are still cases where calling WaitForNodeCount
directly applies - tests that spin up additional nodes or tests that create
nodes in a leaf cluster.
@rosstimothy rosstimothy force-pushed the tross/integration_tests branch from 6012ab5 to 56a5be1 Compare November 20, 2025 22:30
@rosstimothy rosstimothy marked this pull request as ready for review November 21, 2025 13:17
@rosstimothy rosstimothy added the no-changelog Indicates that a PR does not require a changelog entry label Nov 21, 2025
@rosstimothy rosstimothy requested a review from okraport November 21, 2025 13:21
Copy link
Copy Markdown
Contributor

@okraport okraport left a comment

Choose a reason for hiding this comment

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

Fab! Thanks for this!

@rosstimothy rosstimothy added this pull request to the merge queue Nov 21, 2025
Merged via the queue into master with commit 3fb1534 Nov 21, 2025
48 of 49 checks passed
@rosstimothy rosstimothy deleted the tross/integration_tests branch November 21, 2025 18:51
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@rosstimothy See the table below for backport results.

Branch Result
branch/v17 Failed
branch/v18 Create PR

rosstimothy added a commit that referenced this pull request Nov 21, 2025
The changes here are meant to reduce resources consumed by
integration tests and eliminate the footgun of connecting to
a host before its been populated in the appropriate caches.

`(integrationTestSuite) defaultServiceConfig` now disables more services
by default. Host user creation, the Web UI and Web Service, and the
Database Proxy are all now turned off by default. The tests that require
them can opt into turning them on.

`(TeleInstance) Start` now blocks until the processes SSH server is present
in caches before returning. Most tests were already calling this manually
after Start, however, not all of them were. This is frequently forgotten
in new tests and causes flakes if client connections are attempted as
soon as Start returns. There are still cases where calling WaitForNodeCount
directly applies - tests that spin up additional nodes or tests that create
nodes in a leaf cluster.
github-merge-queue bot pushed a commit that referenced this pull request Nov 24, 2025
The changes here are meant to reduce resources consumed by
integration tests and eliminate the footgun of connecting to
a host before its been populated in the appropriate caches.

`(integrationTestSuite) defaultServiceConfig` now disables more services
by default. Host user creation, the Web UI and Web Service, and the
Database Proxy are all now turned off by default. The tests that require
them can opt into turning them on.

`(TeleInstance) Start` now blocks until the processes SSH server is present
in caches before returning. Most tests were already calling this manually
after Start, however, not all of them were. This is frequently forgotten
in new tests and causes flakes if client connections are attempted as
soon as Start returns. There are still cases where calling WaitForNodeCount
directly applies - tests that spin up additional nodes or tests that create
nodes in a leaf cluster.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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