diff --git a/collect/collect_test.go b/collect/collect_test.go index f3596efa8c..4e3ac67413 100644 --- a/collect/collect_test.go +++ b/collect/collect_test.go @@ -214,7 +214,7 @@ func TestAddRootSpan(t *testing.T) { // * remove the trace from the cache assert.Eventually(t, func() bool { return coll.getFromCache(decisionSpanTraceID) == nil - }, conf.GetTracesConfig().GetSendTickerValue()*8, conf.GetTracesConfig().GetSendTickerValue()*2, "after sending the span, it should be removed from the cache") + }, time.Second*1, time.Millisecond*100, "after sending the span, it should be removed from the cache") events = transmission.GetBlock(0) assert.Equal(t, 0, len(events), "adding a root decision span should send the trace but not the decision span itself") @@ -466,7 +466,7 @@ func TestAddSpan(t *testing.T) { trace := coll.getFromCache(traceID) require.NotNil(t, trace) assert.Equal(t, traceID, trace.TraceID, "after adding the span, we should have a trace in the cache with the right trace ID") - }, conf.GetTracesConfig().GetSendDelay()*10, conf.GetTracesConfig().GetSendDelay()*5) + }, time.Second*1, time.Millisecond) assert.Equal(t, 0, len(transmission.GetBlock(0)), "adding a non-root span should not yet send the span") spanFromPeer := &types.Span{