Skip to content

test: fix flaky CSP and Lambda integration tests#3505

Merged
tippmar-nr merged 2 commits intomainfrom
test/flaky-integration-tests-round2
Mar 25, 2026
Merged

test: fix flaky CSP and Lambda integration tests#3505
tippmar-nr merged 2 commits intomainfrom
test/flaky-integration-tests-round2

Conversation

@tippmar-nr
Copy link
Copy Markdown
Member

Summary

  • CSP tests: 4 tests used GetTransactionSamples().FirstOrDefault() which non-deterministically picked the ThrowException trace (500) instead of the GetWithData trace (200), causing spurious assertion failures. Fixed by using TryGetTransactionSample(transactionName) to target the correct transaction.
  • Lambda tests: WarmUpTestTool() could exhaust its 3 retries before the mock Lambda test tool started listening, especially on cold start in CI. Added 5s initial delay and increased retries from 3 to 5.

Test plan

  • CI passes the AwsLambda.Custom integration test suite
  • CI passes the CSP integration test suite
  • No regressions in other integration test suites

🤖 Generated with Claude Code

tippmar-nr and others added 2 commits March 25, 2026 10:30
- CSP tests: Replace GetTransactionSamples().FirstOrDefault() with
  TryGetTransactionSample(transactionName) to target the GetWithData
  transaction. Previously, if the ThrowException trace was harvested
  first, the test failed asserting response.status 200 vs actual 500.

- Lambda tests: Add initial 5s delay and increase warmup retry count
  from 3 to 5 in LambdaTestToolFixture.WarmUpTestTool(), giving the
  mock Lambda test tool more time to start on loaded CI runners.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tippmar-nr tippmar-nr marked this pull request as ready for review March 25, 2026 15:31
@tippmar-nr tippmar-nr requested a review from a team as a code owner March 25, 2026 15:31
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.77%. Comparing base (871f063) to head (e9f03c3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3505      +/-   ##
==========================================
- Coverage   81.79%   81.77%   -0.02%     
==========================================
  Files         508      508              
  Lines       34220    34220              
  Branches     4040     4040              
==========================================
- Hits        27990    27984       -6     
- Misses       5265     5269       +4     
- Partials      965      967       +2     
Flag Coverage Δ
Agent 82.76% <ø> (-0.02%) ⬇️
Profiler 71.75% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tippmar-nr tippmar-nr enabled auto-merge (squash) March 25, 2026 16:11
@tippmar-nr tippmar-nr merged commit d63e16a into main Mar 25, 2026
117 checks passed
@tippmar-nr tippmar-nr deleted the test/flaky-integration-tests-round2 branch March 25, 2026 16:37
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.

3 participants