@@ -90,7 +90,7 @@ func TestDockerResilientSingleDefault(t *testing.T) {
90
90
"--label starter-test=true" ,
91
91
"--name=" + cID2 ,
92
92
"--rm" ,
93
- fmt .Sprintf ("-p %d:%d" , basePort + 5 , basePort ),
93
+ fmt .Sprintf ("-p %d:%d" , basePort + ( 1 * portIncrement ) , basePort ),
94
94
fmt .Sprintf ("-v %s:/data" , volID2 ),
95
95
"-v /var/run/docker.sock:/var/run/docker.sock" ,
96
96
"arangodb/arangodb-starter" ,
@@ -109,7 +109,7 @@ func TestDockerResilientSingleDefault(t *testing.T) {
109
109
"--label starter-test=true" ,
110
110
"--name=" + cID3 ,
111
111
"--rm" ,
112
- fmt .Sprintf ("-p %d:%d" , basePort + 10 , basePort ),
112
+ fmt .Sprintf ("-p %d:%d" , basePort + ( 2 * portIncrement ) , basePort ),
113
113
fmt .Sprintf ("-v %s:/data" , volID3 ),
114
114
"-v /var/run/docker.sock:/var/run/docker.sock" ,
115
115
"arangodb/arangodb-starter" ,
@@ -124,17 +124,17 @@ func TestDockerResilientSingleDefault(t *testing.T) {
124
124
125
125
if ok := WaitUntilStarterReady (t , whatResilientSingle , dockerRun1 , dockerRun2 , dockerRun3 ); ok {
126
126
t .Logf ("ResilientSingle start took %s" , time .Since (start ))
127
- testResilientSingle (t , insecureStarterEndpoint (0 ), false , false )
128
- testResilientSingle (t , insecureStarterEndpoint (5 ), false , false )
129
- testResilientSingle (t , insecureStarterEndpoint (10 ), false , false )
127
+ testResilientSingle (t , insecureStarterEndpoint (0 * portIncrement ), false , false )
128
+ testResilientSingle (t , insecureStarterEndpoint (1 * portIncrement ), false , false )
129
+ testResilientSingle (t , insecureStarterEndpoint (2 * portIncrement ), false , false )
130
130
}
131
131
132
132
if isVerbose {
133
133
t .Log ("Waiting for termination" )
134
134
}
135
- ShutdownStarter (t , insecureStarterEndpoint (0 ))
136
- ShutdownStarter (t , insecureStarterEndpoint (5 ))
137
- ShutdownStarter (t , insecureStarterEndpoint (10 ))
135
+ ShutdownStarter (t , insecureStarterEndpoint (0 * portIncrement ))
136
+ ShutdownStarter (t , insecureStarterEndpoint (1 * portIncrement ))
137
+ ShutdownStarter (t , insecureStarterEndpoint (2 * portIncrement ))
138
138
}
139
139
140
140
// TestDockerResilientSingle2Instance runs 3 arangodb starters in docker with mode=resilientsingle
@@ -197,7 +197,7 @@ func TestDockerResilientSingle2Instance(t *testing.T) {
197
197
"--label starter-test=true" ,
198
198
"--name=" + cID2 ,
199
199
"--rm" ,
200
- fmt .Sprintf ("-p %d:%d" , basePort + 5 , basePort ),
200
+ fmt .Sprintf ("-p %d:%d" , basePort + ( 1 * portIncrement ) , basePort ),
201
201
fmt .Sprintf ("-v %s:/data" , volID2 ),
202
202
"-v /var/run/docker.sock:/var/run/docker.sock" ,
203
203
"arangodb/arangodb-starter" ,
@@ -216,7 +216,7 @@ func TestDockerResilientSingle2Instance(t *testing.T) {
216
216
"--label starter-test=true" ,
217
217
"--name=" + cID3 ,
218
218
"--rm" ,
219
- fmt .Sprintf ("-p %d:%d" , basePort + 10 , basePort ),
219
+ fmt .Sprintf ("-p %d:%d" , basePort + ( 2 * portIncrement ) , basePort ),
220
220
fmt .Sprintf ("-v %s:/data" , volID3 ),
221
221
"-v /var/run/docker.sock:/var/run/docker.sock" ,
222
222
"arangodb/arangodb-starter" ,
@@ -232,15 +232,15 @@ func TestDockerResilientSingle2Instance(t *testing.T) {
232
232
233
233
if ok := WaitUntilStarterReady (t , whatResilientSingle , dockerRun1 , dockerRun2 /*not docker3*/ ); ok {
234
234
t .Logf ("ResilientSingle start took %s" , time .Since (start ))
235
- testResilientSingle (t , insecureStarterEndpoint (0 ), false , false )
236
- testResilientSingle (t , insecureStarterEndpoint (5 ), false , false )
237
- testResilientSingle (t , insecureStarterEndpoint (10 ), false , true )
235
+ testResilientSingle (t , insecureStarterEndpoint (0 * portIncrement ), false , false )
236
+ testResilientSingle (t , insecureStarterEndpoint (1 * portIncrement ), false , false )
237
+ testResilientSingle (t , insecureStarterEndpoint (2 * portIncrement ), false , true )
238
238
}
239
239
240
240
if isVerbose {
241
241
t .Log ("Waiting for termination" )
242
242
}
243
- ShutdownStarter (t , insecureStarterEndpoint (0 ))
244
- ShutdownStarter (t , insecureStarterEndpoint (5 ))
245
- ShutdownStarter (t , insecureStarterEndpoint (10 ))
243
+ ShutdownStarter (t , insecureStarterEndpoint (0 * portIncrement ))
244
+ ShutdownStarter (t , insecureStarterEndpoint (1 * portIncrement ))
245
+ ShutdownStarter (t , insecureStarterEndpoint (2 * portIncrement ))
246
246
}
0 commit comments