Skip to content

Commit

Permalink
ddtrace/tracer: increase small timeout to avoid flaky tests. (#1339)
Browse files Browse the repository at this point in the history
Apparently 200ms is not enough in all cases for async things to happen,
resulting in flaky tests. This increases the timeout to one second. If it
is not enough this can be increased more. Since these are not performance
tests we don't really care how long it takes.

Fixes #1324
  • Loading branch information
knusbaum committed Jun 15, 2022
1 parent 495c17f commit f24f385
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ddtrace/tracer/tracer_test.go
Expand Up @@ -65,7 +65,7 @@ func TestMain(m *testing.M) {
}

func (t *tracer) awaitPayload(tst *testing.T, n int) {
timeout := time.After(200 * time.Millisecond * timeMultiplicator)
timeout := time.After(time.Second * timeMultiplicator)
loop:
for {
select {
Expand Down Expand Up @@ -1520,7 +1520,7 @@ func startTestTracer(t interface {
tick <- time.Now()
return
}
d := 200 * time.Millisecond * timeMultiplicator
d := time.Second * timeMultiplicator
expire := time.After(d)
loop:
for {
Expand Down

0 comments on commit f24f385

Please sign in to comment.