Skip to content

Commit 11b43e2

Browse files
authored
[tests] quickfix for mixed mode sampling test (#4804)
1 parent 46cb709 commit 11b43e2

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

test/IntegrationTests/SelectiveSamplerTests.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,14 @@ public void ExportThreadSamplesInMixedMode()
8181
var counter = 0;
8282

8383
// Sampling starts early, at the start of instrumentation init.
84-
var groupingStartingWithAllThreadSamples = groupedByTimestampAscending.SkipWhile(
85-
samples =>
86-
IndicatesSelectiveSampling(samples) ||
87-
CollectedBeforeSpanStarted(samples) ||
88-
CollectedBeforeFrequentSamplingStarted(samples));
84+
var groupingStartingWithAllThreadSamples = groupedByTimestampAscending
85+
.SkipWhile(
86+
samples =>
87+
IndicatesSelectiveSampling(samples) ||
88+
CollectedBeforeSpanStarted(samples) ||
89+
CollectedBeforeFrequentSamplingStarted(samples))
90+
// Omit last group from verification, as it may be collected after activity stopped.
91+
.SkipLast(1);
8992

9093
foreach (var group in groupingStartingWithAllThreadSamples)
9194
{

0 commit comments

Comments
 (0)