From 2c7766101368f098326cf2ceb04fc336382b7d77 Mon Sep 17 00:00:00 2001 From: Gordon Date: Tue, 28 Jul 2026 21:14:18 +0000 Subject: [PATCH] integration-cli: extend Windows poll timeout for --rm flag tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extend the poll.WaitOn timeout for TestRunContainerWithRmFlagCannotStartContainer and TestRunContainerWithRmFlagExitCodeNotEqualToZero on Windows from the default 10 seconds to 60 seconds. On Windows, container teardown after docker run --rm involves: 1. HCS layer unmount (ReleaseLayer call via HCSSHIM) 2. EnsureRemoveAll with up to 50 retries × 100ms sleep on ERROR_ACCESS_DENIED / ERROR_SHARING_VIOLATION / ERROR_LOCK_VIOLATION / ERROR_DIR_NOT_EMPTY Under CI load this can exceed the default 10-second poll budget, causing: timeout hit after 10s: waiting for container 'sparkles' to be removed This fix applies the same pattern already used in TestRunStdinBlockedAfterContainerExit (added in a81aa78ceb) to the two --rm flag tests. Signed-off-by: Gordon Signed-off-by: Sebastiaan van Stijn --- integration-cli/docker_cli_run_test.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/integration-cli/docker_cli_run_test.go b/integration-cli/docker_cli_run_test.go index 1c3d50437c..58b50cdd62 100644 --- a/integration-cli/docker_cli_run_test.go +++ b/integration-cli/docker_cli_run_test.go @@ -2673,7 +2673,11 @@ func (s *DockerCLIRunSuite) TestRunContainerWithRmFlagExitCodeNotEqualToZero(c * ExitCode: 1, }) - poll.WaitOn(c, containerRemoved(name)) + removeTimeout := 10 * time.Second + if DaemonIsWindows() { + removeTimeout = 60 * time.Second + } + poll.WaitOn(c, containerRemoved(name), poll.WithTimeout(removeTimeout)) } func (s *DockerCLIRunSuite) TestRunContainerWithRmFlagCannotStartContainer(c *testing.T) { @@ -2682,7 +2686,11 @@ func (s *DockerCLIRunSuite) TestRunContainerWithRmFlagCannotStartContainer(c *te ExitCode: 127, }) - poll.WaitOn(c, containerRemoved(name)) + removeTimeout := 10 * time.Second + if DaemonIsWindows() { + removeTimeout = 60 * time.Second + } + poll.WaitOn(c, containerRemoved(name), poll.WithTimeout(removeTimeout)) } func containerRemoved(name string) poll.Check {