Skip to content

Commit 86e1ed8

Browse files
committed
add logs to debug flaky test
Signed-off-by: Swagat Bora <[email protected]>
1 parent 81c6e22 commit 86e1ed8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

runtime/service_integ_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,12 @@ func startAndWaitTask(ctx context.Context, t testing.TB, c containerd.Container)
946946
assert.NoError(t, exitStatus.Error(), "failed to retrieve exitStatus")
947947
assert.Equal(t, uint32(0), exitStatus.ExitCode())
948948

949+
// Print anything on stderr to help with debugging
950+
stderrOutput := stderr.String()
951+
if len(stderrOutput) != 0 {
952+
fmt.Printf("stderr output from container %s: %s", c.ID(), stderrOutput)
953+
}
954+
949955
status, err := task.Delete(ctx)
950956
assert.NoErrorf(t, err, "failed to delete task %q after exit", c.ID())
951957
if status != nil {

0 commit comments

Comments
 (0)