Repository navigation
test(windows): do not run TestNetworkInspectWithContainers in parallel - #5269
Merged
AkihiroSuda merged 1 commit intoOct 27, 2026
Merged
Conversation
On Windows, the subtests of TestNetworkInspectWithContainers each create nat networks and start containers on them concurrently, and one of them regularly fails with "hcnCreateNetwork failed in Win32: The object already exists. (0x1392)" (containerd#4322). Run the test and its subtests sequentially on Windows, and drop the sleep that was added after "network create" as a workaround. Signed-off-by: Ethan Aldrich <ethan@ethanaldrich.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4322
On Windows, the subtests of
TestNetworkInspectWithContainerseach create nat networks and start a container on them, all in parallel (tigron runs tests in parallel unlessNoParallelis set), together with the rest of thenetworkpackage tests. One of them regularly fails with:#4360 added a one second sleep after
network create. That did not fix it: the baseline runs below were made with the #4360 sleeps in place and still failed.This sets
NoParallelon the test and its subtests when running on Windows (NoParallelis not inherited by subtests, so each one needs it; this followscontainer_run_network_windows_test.go), and removes the sleeps in this test. Other platforms are unchanged. I left the sleep inTestNetworkInspectDualStackalone; it is skipped on Windows.I have not identified the exact HNS race, only that serializing these tests makes it go away.
Testing
Runs on a fork (
windows-2022, samejob-test-in-hostworkflow, trimmed to the windows job):Before (main):
TestNetworkInspectWithContainersTestNetworkInspectWithContainers, 40 jobs, 2 failed with 0x1392cni.shfix, full suite, 5 runs x 10 jobs: 12 failed with 0x1392 inTestNetworkInspectWithContainers(runs 38944446472, 38944456629, 38944460822, 38944464805, 38944468969)With this change:
TestNetworkInspectWithContainers, 60/60 passedTestRunRmTimetiming flakeSo 16/100 jobs hit 0x1392 without this change and 0/110 with it. The runs with this change also include the separate
cni.shfix (#5268), which does not touch this test.go vetpasses for the package on windows and linux, andgofmtis clean.