diff --git a/profiler/profiler_test.go b/profiler/profiler_test.go index bbc0d9b519..927f50ae2b 100644 --- a/profiler/profiler_test.go +++ b/profiler/profiler_test.go @@ -202,14 +202,10 @@ func TestProfilerPassthrough(t *testing.T) { } p.run() var bat batch -loop: - for { - select { - case bat = <-p.out: - break loop - case <-time.After(500 * time.Millisecond): - t.Fatal("time expired") - } + select { + case bat = <-out: + case <-time.After(500 * time.Millisecond): + t.Fatal("time expired") } assert.Equal(t, 2, len(bat.profiles))