Skip to content

Commit

Permalink
Log when we get unexpected shutdown err
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany committed Jan 15, 2025
1 parent f888e4a commit 6fc7040
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/osquery/runtime/osqueryinstance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func TestLaunch(t *testing.T) {

select {
case err := <-shutdownErr:
require.True(t, errors.Is(err, context.Canceled), fmt.Sprintf("unexpected err %v; instance logs:\n\n%s", err, logBytes.String()))
require.True(t, errors.Is(err, context.Canceled), fmt.Sprintf("unexpected err at %s: %v; instance logs:\n\n%s", time.Now().String(), err, logBytes.String()))
case <-time.After(1 * time.Minute):
t.Error("instance did not shut down within timeout", fmt.Sprintf("instance logs: %s", logBytes.String()))
t.FailNow()
Expand Down

0 comments on commit 6fc7040

Please sign in to comment.