Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update flaky test #1436

Merged
merged 2 commits into from
Nov 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions collect/collect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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{
Expand Down