diff --git a/runtime/service_integ_test.go b/runtime/service_integ_test.go index 122d9c9a9..72858425d 100644 --- a/runtime/service_integ_test.go +++ b/runtime/service_integ_test.go @@ -946,6 +946,9 @@ func startAndWaitTask(ctx context.Context, t testing.TB, c containerd.Container) assert.NoError(t, exitStatus.Error(), "failed to retrieve exitStatus") assert.Equal(t, uint32(0), exitStatus.ExitCode()) + // Introduce some wait before deleting the task to allow for the data to be streamed + time.Sleep(5 * time.Second) + status, err := task.Delete(ctx) assert.NoErrorf(t, err, "failed to delete task %q after exit", c.ID()) if status != nil { @@ -2579,6 +2582,9 @@ func TestAttach_Isolated(t *testing.T) { <-ch + // Introduce some wait before deleting the task + time.Sleep(5 * time.Second) + _, err = t2.Delete(ctx) require.NoError(t, err)