Repository navigation
Commit a736c02
Fix flaky BaseComposeTest network check by scoping it to the compose project (#12181)
verifyNoNetworks compared the daemon-wide Docker network list before and
after each test. Core tests run in 4 parallel forks against one daemon, so
networks that other tests created or removed made the assertion fail
intermittently. This was seen in ComposeContainerTest.simpleTest,
ComposeContainerPortViaEnvTest.simpleTest and
ComposeContainerTest.shouldCreateContainerWhenFileNotPrefixedWithPath.
Only list the networks labelled with the test's own
com.docker.compose.project, read from the redis-1 service container. Also
assert that this list is non-empty before the test, so the check can't pass
vacuously. Test-only change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 9f56948 commit a736c02
1 file changed
Lines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
| 31 | + | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| |||
63 | 68 | | |
64 | 69 | | |
65 | 70 | | |
66 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
67 | 78 | | |
68 | 79 | | |
69 | 80 | | |
70 | 81 | | |
71 | | - | |
| 82 | + | |
72 | 83 | | |
73 | 84 | | |
74 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
75 | 91 | | |
76 | 92 | | |
77 | 93 | | |
78 | 94 | | |
| 95 | + | |
79 | 96 | | |
80 | 97 | | |
81 | 98 | | |
| |||
0 commit comments