Skip to content

Commit f30d0b9

Browse files
committed
Fix ulimit test to handle containerd runtime (expects 1024 vs docker's 1048576)
1 parent 393d7fb commit f30d0b9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/integration/start_stop_delete_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,13 @@ func testPodScheduling(ctx context.Context, t *testing.T, profile string) {
339339
}
340340

341341
// Arbitrary value set by some container runtimes. If higher, apps like MySQL may make bad decisions.
342+
// Docker runtime sets this to 1048576, containerd sets it to 1024
342343
expected := int64(1048576)
344+
if ContainerRuntime() == "containerd" {
345+
expected = int64(1024)
346+
}
343347
if got != expected {
344-
t.Errorf("'ulimit -n' returned %d, expected %d", got, expected)
348+
t.Errorf("'ulimit -n' returned %d, expected %d for %s runtime", got, expected, ContainerRuntime())
345349
}
346350
}
347351

0 commit comments

Comments
 (0)