Skip to content

[Tracer] Fix EventHubs flaky batch test#7734

Merged
pablomartinezbernardo merged 1 commit intomasterfrom
pmartinez/eventhubs-flaky-test
Oct 29, 2025
Merged

[Tracer] Fix EventHubs flaky batch test#7734
pablomartinezbernardo merged 1 commit intomasterfrom
pmartinez/eventhubs-flaky-test

Conversation

@pablomartinezbernardo
Copy link
Contributor

@pablomartinezbernardo pablomartinezbernardo commented Oct 29, 2025

Summary of changes

Expect at least 1 receive span instead of exactly one.

Reason for change

The test expectations were incorrect, as ReadEventsFromPartitionAsync may call ReceiveAsync several times depending on timing.

@github-actions github-actions bot added the area:tests unit tests, integration tests label Oct 29, 2025
@dd-trace-dotnet-ci-bot
Copy link

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing the following branches/commits:

Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7734) - mean (72ms)  : 71, 73
     .   : milestone, 72,
    master - mean (71ms)  : 71, 72
     .   : milestone, 71,

    section Baseline
    This PR (7734) - mean (68ms)  : 67, 69
     .   : milestone, 68,
    master - mean (68ms)  : 67, 69
     .   : milestone, 68,

    section CallTarget+Inlining+NGEN
    This PR (7734) - mean (1,049ms)  : 990, 1108
     .   : milestone, 1049,
    master - mean (1,041ms)  : 1010, 1072
     .   : milestone, 1041,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7734) - mean (107ms)  : 105, 108
     .   : milestone, 107,
    master - mean (106ms)  : 105, 107
     .   : milestone, 106,

    section Baseline
    This PR (7734) - mean (106ms)  : 103, 109
     .   : milestone, 106,
    master - mean (105ms)  : 102, 108
     .   : milestone, 105,

    section CallTarget+Inlining+NGEN
    This PR (7734) - mean (747ms)  : 725, 769
     .   : milestone, 747,
    master - mean (749ms)  : 726, 772
     .   : milestone, 749,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7734) - mean (94ms)  : 93, 95
     .   : milestone, 94,
    master - mean (94ms)  : 93, 94
     .   : milestone, 94,

    section Baseline
    This PR (7734) - mean (94ms)  : 92, 95
     .   : milestone, 94,
    master - mean (93ms)  : 91, 96
     .   : milestone, 93,

    section CallTarget+Inlining+NGEN
    This PR (7734) - mean (706ms)  : 678, 733
     .   : milestone, 706,
    master - mean (708ms)  : 673, 744
     .   : milestone, 708,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7734) - mean (92ms)  : 91, 94
     .   : milestone, 92,
    master - mean (92ms)  : 91, 94
     .   : milestone, 92,

    section Baseline
    This PR (7734) - mean (91ms)  : 89, 93
     .   : milestone, 91,
    master - mean (91ms)  : 89, 93
     .   : milestone, 91,

    section CallTarget+Inlining+NGEN
    This PR (7734) - mean (658ms)  : 642, 674
     .   : milestone, 658,
    master - mean (662ms)  : 648, 677
     .   : milestone, 662,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7734) - mean (196ms)  : 193, 199
     .   : milestone, 196,
    master - mean (196ms)  : 193, 200
     .   : milestone, 196,

    section Baseline
    This PR (7734) - mean (192ms)  : 188, 196
     .   : milestone, 192,
    master - mean (193ms)  : 189, 196
     .   : milestone, 193,

    section CallTarget+Inlining+NGEN
    This PR (7734) - mean (1,162ms)  : 1108, 1217
     .   : milestone, 1162,
    master - mean (1,164ms)  : 1099, 1229
     .   : milestone, 1164,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7734) - mean (277ms)  : 272, 282
     .   : milestone, 277,
    master - mean (278ms)  : 272, 285
     .   : milestone, 278,

    section Baseline
    This PR (7734) - mean (277ms)  : 271, 282
     .   : milestone, 277,
    master - mean (276ms)  : 272, 280
     .   : milestone, 276,

    section CallTarget+Inlining+NGEN
    This PR (7734) - mean (946ms)  : 905, 988
     .   : milestone, 946,
    master - mean (946ms)  : 908, 984
     .   : milestone, 946,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7734) - mean (269ms)  : 266, 273
     .   : milestone, 269,
    master - mean (269ms)  : 266, 272
     .   : milestone, 269,

    section Baseline
    This PR (7734) - mean (269ms)  : 264, 274
     .   : milestone, 269,
    master - mean (269ms)  : 264, 274
     .   : milestone, 269,

    section CallTarget+Inlining+NGEN
    This PR (7734) - mean (936ms)  : 875, 996
     .   : milestone, 936,
    master - mean (932ms)  : 882, 982
     .   : milestone, 932,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7734) - mean (268ms)  : 264, 272
     .   : milestone, 268,
    master - mean (269ms)  : 261, 277
     .   : milestone, 269,

    section Baseline
    This PR (7734) - mean (268ms)  : 263, 274
     .   : milestone, 268,
    master - mean (268ms)  : 263, 272
     .   : milestone, 268,

    section CallTarget+Inlining+NGEN
    This PR (7734) - mean (849ms)  : 829, 870
     .   : milestone, 849,
    master - mean (851ms)  : 829, 872
     .   : milestone, 851,

Loading

@pablomartinezbernardo pablomartinezbernardo marked this pull request as ready for review October 29, 2025 13:12
@pablomartinezbernardo pablomartinezbernardo requested review from a team as code owners October 29, 2025 13:12
Copy link
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

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

Thanks!

@pablomartinezbernardo pablomartinezbernardo merged commit 068a6d8 into master Oct 29, 2025
153 checks passed
@pablomartinezbernardo pablomartinezbernardo deleted the pmartinez/eventhubs-flaky-test branch October 29, 2025 14:03
@github-actions github-actions bot added this to the vNext-v3 milestone Oct 29, 2025
andrewlock pushed a commit that referenced this pull request Nov 4, 2025
## Summary of changes

Same issue with flaky tests as #7734, I missed more usages of the
function

> The test expectations were incorrect, as ReadEventsFromPartitionAsync
may call ReceiveAsync [several times depending on
timing](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventhub/Azure.Messaging.EventHubs/src/Consumer/EventHubConsumerClient.cs#L520).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tests unit tests, integration tests type:flake-fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants