Skip to content

Commit 7e9122d

Browse files
committed
Remove TestConcurrentTraceMapSize
1 parent 42f735d commit 7e9122d

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed

processor/tailsamplingprocessor/processor_test.go

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -554,48 +554,6 @@ func TestConsumptionDuringPolicyEvaluation(t *testing.T) {
554554
}, 1*time.Second, 100*time.Millisecond)
555555
}
556556

557-
func TestConcurrentTraceMapSize(t *testing.T) {
558-
t.Skip("Flaky test, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/9126")
559-
_, batches := generateIDsAndBatches(210)
560-
const maxSize = 100
561-
var wg sync.WaitGroup
562-
cfg := Config{
563-
DecisionWait: defaultTestDecisionWait,
564-
NumTraces: uint64(maxSize),
565-
ExpectedNewTracesPerSec: 64,
566-
PolicyCfgs: testPolicy,
567-
Options: []Option{
568-
withTickerFrequency(100 * time.Millisecond),
569-
},
570-
}
571-
sp, _ := newTracesProcessor(t.Context(), processortest.NewNopSettings(metadata.Type), consumertest.NewNop(), cfg)
572-
require.NoError(t, sp.Start(t.Context(), componenttest.NewNopHost()))
573-
defer func() {
574-
require.NoError(t, sp.Shutdown(t.Context()))
575-
}()
576-
577-
for _, batch := range batches {
578-
wg.Add(1)
579-
go func(td ptrace.Traces) {
580-
assert.NoError(t, sp.ConsumeTraces(t.Context(), td))
581-
wg.Done()
582-
}(batch)
583-
}
584-
585-
wg.Wait()
586-
587-
// Since we can't guarantee the order of insertion the only thing that can be checked is
588-
// if the number of traces on the map matches the expected value.
589-
// cnt := 0
590-
// tsp := sp.(*tailSamplingSpanProcessor)
591-
// tsp.idToTrace.Range(func(_, _ any) bool {
592-
// cnt++
593-
// return true
594-
// })
595-
// require.Equal(t, maxSize, cnt, "Incorrect traces count on idToTrace")
596-
t.FailNow()
597-
}
598-
599557
func TestMultipleBatchesAreCombinedIntoOne(t *testing.T) {
600558
controller := newTestTSPController()
601559
msp := new(consumertest.TracesSink)

0 commit comments

Comments
 (0)