Skip to content

Commit a2fb610

Browse files
florianlgnurizen
authored andcommitted
golabels: fix race condition (open-telemetry#744)
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
1 parent a7dd682 commit a2fb610

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

interpreter/golabels/integrationtests/golabels_integration_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,12 @@ func Test_Golabels(t *testing.T) {
121121

122122
go func() {
123123
if err := exec.CommandContext(ctx, exe.Name()).Run(); err != nil {
124-
t.Log(err)
124+
select {
125+
case <-ctx.Done():
126+
// Context is canceled, meaning the test is done.
127+
default:
128+
t.Log(err)
129+
}
125130
}
126131
}()
127132

0 commit comments

Comments
 (0)