Skip to content

Commit 6212483

Browse files
committed
delete: reduce check waiting time
reduce waiting time from 10 seconds to 3 seconds when we check for "delete" effects. The test would be very slow otherwise and cause the TAP driver to timeout. Signed-off-by: Giuseppe Scrivano <[email protected]>
1 parent 3abdc1f commit 6212483

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

validation/delete/delete.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import (
1616
func main() {
1717
t := tap.New()
1818
t.Header(0)
19+
defer t.AutoPlan()
20+
1921
bundleDir, err := util.PrepareBundle()
2022
if err != nil {
2123
util.Fatal(err)
@@ -72,7 +74,7 @@ func main() {
7274

7375
if c.effectCheck {
7476
// waiting for the error of State, just in case the delete operation takes time
75-
util.WaitingForStatus(testRuntime, util.LifecycleActionNone, time.Second*10, time.Second*1)
77+
util.WaitingForStatus(testRuntime, util.LifecycleActionNone, time.Second*3, time.Second/2)
7678
_, err = testRuntime.State()
7779
// err == nil means the 'delete' operation does NOT take effect
7880
util.SpecErrorOK(t, err == nil, specerror.NewError(specerror.DeleteNonStopHaveNoEffect, fmt.Errorf("attempting to `delete` a container that is not `stopped` MUST have no effect on the container"), rspecs.Version), err)
@@ -89,6 +91,4 @@ func main() {
8991
}
9092
}
9193
}
92-
93-
t.AutoPlan()
9494
}

0 commit comments

Comments
 (0)