Skip to content

Commit

Permalink
integration: add testcase to drain exec IO in time
Browse files Browse the repository at this point in the history
Signed-off-by: Wei Fu <fuweid89@gmail.com>
(cherry picked from commit 55e25f1)
Signed-off-by: Wei Fu <fuweid89@gmail.com>
  • Loading branch information
fuweid committed Feb 16, 2024
1 parent b5d52ef commit ce21343
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions integration/container_exec_test.go
Expand Up @@ -63,4 +63,8 @@ func TestContainerDrainExecIOAfterExit(t *testing.T) {
t.Log("Exec in container")
_, _, err = runtimeService.ExecSync(cn, []string{"sh", "-c", "sleep 365d &"}, 5*time.Second)
require.ErrorContains(t, err, "failed to drain exec process")

t.Log("Exec in container")
_, _, err = runtimeService.ExecSync(cn, []string{"sh", "-c", "sleep 2s &"}, 10*time.Second)
require.NoError(t, err, "should drain IO in time")
}

0 comments on commit ce21343

Please sign in to comment.