Skip to content

Commit 00643cd

Browse files
committed
tests: wait for xtables lock in builder cache registry rules
1 parent b7bdbb2 commit 00643cd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

integration/builder_cache_linux_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ func startBuildRegistry(t *testing.T, gateway, bridge string, p *paths.Paths, im
181181
t.Cleanup(func() { _ = server.Close() })
182182
port := strconv.Itoa(listener.Addr().(*net.TCPAddr).Port)
183183
firewallArgs := []string{"INPUT", "-i", bridge, "-p", "tcp", "--dport", port, "-j", "ACCEPT"}
184-
output, err := exec.Command("iptables", append([]string{"-I"}, firewallArgs...)...).CombinedOutput()
184+
output, err := exec.Command("iptables", append([]string{"-w", "5", "-I"}, firewallArgs...)...).CombinedOutput()
185185
require.NoErrorf(t, err, "allow registry traffic: %s", output)
186-
t.Cleanup(func() { _ = exec.Command("iptables", append([]string{"-D"}, firewallArgs...)...).Run() })
186+
t.Cleanup(func() { _ = exec.Command("iptables", append([]string{"-w", "5", "-D"}, firewallArgs...)...).Run() })
187187
return net.JoinHostPort(gateway, port), string(certPEM)
188188
}
189189

0 commit comments

Comments
 (0)