Skip to content

Commit c4f03b2

Browse files
committed
add sleep before task delete
Signed-off-by: Swagat Bora <[email protected]>
1 parent 81c6e22 commit c4f03b2

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,9 @@ 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+
// Introduce some wait before deleting the task to allow for the data to be streamed
950+
time.Sleep(5 * time.Second)
951+
949952
status, err := task.Delete(ctx)
950953
assert.NoErrorf(t, err, "failed to delete task %q after exit", c.ID())
951954
if status != nil {
@@ -2579,6 +2582,9 @@ func TestAttach_Isolated(t *testing.T) {
25792582

25802583
<-ch
25812584

2585+
// Introduce some wait before deleting the task
2586+
time.Sleep(5 * time.Second)
2587+
25822588
_, err = t2.Delete(ctx)
25832589
require.NoError(t, err)
25842590

0 commit comments

Comments
 (0)