Skip to content

Fix flakey testTelemetryEnabled test - #2250

Merged
jar-stripe merged 2 commits into
private-previewfrom
jar/troubleshoot-flaky-test
Jul 16, 2026
Merged

Fix flakey testTelemetryEnabled test#2250
jar-stripe merged 2 commits into
private-previewfrom
jar/troubleshoot-flaky-test

Conversation

@jar-stripe

@jar-stripe jar-stripe commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Why?

The testTelemetryEnabled test will fail frequently which can delay releases and other PR merges. This has happened more frequently in the past several months. The condition that is failing tests that the request timeout ms is strictly greater than the 30ms body delay configured in the test. After adding an assertion message that prints out the actual value, it looks like the mock request is completing in 30ms

org.opentest4j.AssertionFailedError: 30 is not greater than 30 ==> expected: <true> but was: <false>

I suspect this is a rounding/truncating issue, but either way we should accept any number equal or greater to the delay here.

What?

  • Modifies assert calls that test request duration to be greater than or equal to the delay value
  • Adds assert message to help troubleshoot any future issues (if this is not the complete fix).

See Also

@jar-stripe
jar-stripe requested a review from a team as a code owner July 16, 2026 19:37
@jar-stripe
jar-stripe requested review from kidus-stripe and removed request for a team July 16, 2026 19:37
@jar-stripe
jar-stripe marked this pull request as draft July 16, 2026 19:37
@jar-stripe
jar-stripe removed the request for review from kidus-stripe July 16, 2026 19:37
@jar-stripe jar-stripe changed the title added message to flakey assertion to help us troubleshoot Fix flakey testTelemetryEnabled test Jul 16, 2026
@jar-stripe
jar-stripe marked this pull request as ready for review July 16, 2026 21:35
@jar-stripe
jar-stripe enabled auto-merge (squash) July 16, 2026 21:35
@jar-stripe
jar-stripe disabled auto-merge July 16, 2026 21:35
@jar-stripe
jar-stripe enabled auto-merge (squash) July 16, 2026 21:35
@jar-stripe
jar-stripe requested a review from xavdid July 16, 2026 21:35

@xavdid xavdid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice!

@jar-stripe

Copy link
Copy Markdown
Contributor Author

nice!

thanks! we'll see if this was entirely the issue 🤞

@jar-stripe
jar-stripe merged commit 72db1d2 into private-preview Jul 16, 2026
18 checks passed
@jar-stripe
jar-stripe deleted the jar/troubleshoot-flaky-test branch July 16, 2026 21:42
jar-stripe added a commit that referenced this pull request Jul 16, 2026
* added message to flakey assertion to help us troubleshoot

* changed operator from greater than to greater than or equal to
jar-stripe added a commit that referenced this pull request Jul 17, 2026
* added message to flakey assertion to help us troubleshoot

* changed operator from greater than to greater than or equal to
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