@@ -13,7 +13,7 @@ import (
13
13
14
14
const (
15
15
CosmosDBLocalPort = "8081"
16
- maxWait = 5 * time .Minute // Cosmosdb emulator takes time to start
16
+ maxWait = 7 * time .Minute // Cosmosdb emulator takes time to start
17
17
)
18
18
19
19
var cosmosdbLocalURI string
@@ -59,16 +59,20 @@ func GetCosmosDBInstance() (string, func(), error) {
59
59
return "" , nil , fmt .Errorf ("joining urls: %w" , err )
60
60
}
61
61
62
+ client := http.Client {
63
+ Transport : & http.Transport {
64
+ TLSClientConfig : & tls.Config {InsecureSkipVerify : true }, //nolint:gosec // ignore self-signed cert for local testing using the emulator
65
+ },
66
+ Timeout : 5 * time .Second ,
67
+ }
68
+
62
69
dockerPool .MaxWait = maxWait
63
70
log .Printf ("Waiting up to %v for emulator to start" , dockerPool .MaxWait )
64
71
// Note: this hangs for macOS users, and fails. See https://github.com/treeverse/lakeFS/issues/8476
65
72
err = dockerPool .Retry (func () error {
66
73
// waiting for cosmosdb container to be ready by issuing an HTTP get request with
67
74
// exponential backoff retry. The response is not really meaningful for that case
68
75
// and so is ignored
69
- client := http.Client {Transport : & http.Transport {
70
- TLSClientConfig : & tls.Config {InsecureSkipVerify : true }, //nolint:gosec // ignore self-signed cert for local testing using the emulator
71
- }}
72
76
resp , err := client .Get (p )
73
77
if err != nil {
74
78
return err
0 commit comments