Skip to content

Commit

Permalink
[CONTINT-4278] Fix a race condition in `pkg/sbom/scanner/TestRetryLog…
Browse files Browse the repository at this point in the history
…ic_Error` (#27748)
  • Loading branch information
L3n41c authored Jul 19, 2024
1 parent 7f68547 commit 2a142a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sbom/scanner/scanner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ func TestRetryLogic_Error(t *testing.T) {
mockCollector.On("Scan", mock.Anything, mock.Anything).Return(expectedResult).Once()
mockCollector.On("Channel").Return(resultCh)
shutdown := mockCollector.On("Shutdown")
shutdown.After(5 * time.Second)
mockCollector.On("Type").Return(tt.st)

// Set up the configuration as the default one is too slow
Expand Down Expand Up @@ -150,7 +151,6 @@ func TestRetryLogic_Error(t *testing.T) {
case <-time.After(time.Second):
}
cancel()
shutdown.WaitUntil(time.After(5 * time.Second))
})
}
}
Expand Down

0 comments on commit 2a142a0

Please sign in to comment.