acme: increase pebble test waitForServer attempts
In CI it seems that occasionally we can't connect to the test servers within 10 tries, and the test flakes. Let's give the process more attempts. Updates golang/go#74437 Change-Id: I74d6cea83468a3a572ec4b52ff7314c778c664cf Cq-Include-Trybots: luci.golang.try:x_crypto-gotip-linux-amd64-longtest Reviewed-on: https://go-review.googlesource.com/c/crypto/+/692075 Auto-Submit: Daniel McCarney <daniel@binaryparadox.net> Reviewed-by: Roland Shoemaker <roland@golang.org> Reviewed-by: Mark Freeman <mark@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
committed by
Gopher Robot
parent
1b4c3d2e8c
commit
1fda73153f
+2
-2
@@ -692,14 +692,14 @@ func startPebbleEnvironment(t *testing.T, config *environmentConfig) environment
|
||||
func waitForServer(t *testing.T, addr string) {
|
||||
t.Helper()
|
||||
|
||||
for i := 0; i < 10; i++ {
|
||||
for i := 0; i < 20; i++ {
|
||||
if conn, err := net.Dial("tcp", addr); err == nil {
|
||||
conn.Close()
|
||||
return
|
||||
}
|
||||
time.Sleep(time.Duration(i*100) * time.Millisecond)
|
||||
}
|
||||
t.Fatalf("failed to connect to %q after 10 tries", addr)
|
||||
t.Fatalf("failed to connect to %q after 20 tries", addr)
|
||||
}
|
||||
|
||||
// fetchModule fetches the module at the given version and returns the directory
|
||||
|
||||
Reference in New Issue
Block a user