Skip to content

test: Fix flaky end-to-end tests#351

Merged
aaron-zeisler merged 1 commit intov7from
aaronz/fix-flaky-end-to-end-tests
Feb 19, 2026
Merged

test: Fix flaky end-to-end tests#351
aaron-zeisler merged 1 commit intov7from
aaronz/fix-flaky-end-to-end-tests

Conversation

@aaron-zeisler
Copy link
Contributor

@aaron-zeisler aaron-zeisler commented Feb 19, 2026

While working with the Go server SDK, I noticed that some tests were intermittently failing in CI. These tests were unrelated to the changes that I was making. After digging into the failures, I found that the failing tests were asserting that an LDClient object was in the "VALID" state immedaitely after initializing the object. In CI, the state was being reported as "INITIALIZING". When I simply re-ran the tests in the CI system, the tests passed.

This commit updates tests cases in the end-to-end tests to wait for the LDClient to reach the "VALID" state. I've used the WaitFor() method that's built into the client. The test times out if the client hasn't reached the expected state within 5 seconds.

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

Provide links to any issues in this repository or elsewhere relating to this pull request.

Describe the solution you've provided

Provide a clear and concise description of what you expect to happen.

Describe alternatives you've considered

Provide a clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context about the pull request here.


Note

Low Risk
Test-only change that adds bounded waits to avoid timing-related flakes; no production logic is modified.

Overview
Updates several FDv2 end-to-end tests to wait for initialization to complete instead of asserting the data source is immediately VALID after client creation.

Each affected test now calls client.GetDataSourceStatusProvider().WaitFor(interfaces.DataSourceStateValid, 5s) and fails with a clear timeout message if the state never becomes VALID, reducing intermittent CI failures due to startup timing.

Written by Cursor Bugbot for commit ecedbd6. This will update automatically on new commits. Configure here.

@aaron-zeisler aaron-zeisler requested a review from a team as a code owner February 19, 2026 05:15
@aaron-zeisler aaron-zeisler changed the base branch from v7 to aaronz/update-golangci-lint-version February 19, 2026 05:18
@aaron-zeisler aaron-zeisler changed the title chore: Fix flaky end-to-end tests fix: Fix flaky end-to-end tests Feb 19, 2026
@aaron-zeisler aaron-zeisler changed the title fix: Fix flaky end-to-end tests test: Fix flaky end-to-end tests Feb 19, 2026
Base automatically changed from aaronz/update-golangci-lint-version to v7 February 19, 2026 17:35
While working with the Go server SDK, I noticed that some tests
were intermittently failing in CI. These tests were unrelated to
the changes that I was making. After digging into the failures,
I found that the failing tests were asserting that an LDClient
object was in the "VALID" state immedaitely after initializing
the object. In CI, the state was being reported as "INITIALIZING".
When I simply re-ran the tests in the CI system, the tests passed.

This commit updates tests cases in the end-to-end tests to wait
for the LDClient to reach the "VALID" state. I've used the WaitFor()
method that's built into the client. The test times out if the
client hasn't reached the expected state within 5 seconds.
@aaron-zeisler aaron-zeisler force-pushed the aaronz/fix-flaky-end-to-end-tests branch from 55cab1e to ecedbd6 Compare February 19, 2026 17:38
@aaron-zeisler aaron-zeisler merged commit 0cdf093 into v7 Feb 19, 2026
34 checks passed
@aaron-zeisler aaron-zeisler deleted the aaronz/fix-flaky-end-to-end-tests branch February 19, 2026 17:45
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

Comments