This repository was archived by the owner on Apr 10, 2024. It is now read-only.
File tree 1 file changed +7
-2
lines changed
core/src/main/java/io/javaoperatorsdk/jenvtest/process
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -32,14 +32,19 @@ public EtcdProcess(BinaryManager binaryManager,
32
32
public int startEtcd () {
33
33
var etcdBinary = binaryManager .binaries ().getEtcd ();
34
34
var port = Utils .findFreePort ();
35
+ var peerPort = Utils .findFreePort ();
35
36
try {
36
37
if (!etcdBinary .exists ()) {
37
38
throw new JenvtestException (
38
39
"Missing binary for etcd on path: " + etcdBinary .getAbsolutePath ());
39
40
}
40
41
etcdProcess = new ProcessBuilder (etcdBinary .getAbsolutePath (),
41
- "--listen-client-urls=http://0.0.0.0:" + port ,
42
- "--advertise-client-urls=http://0.0.0.0:" + port )
42
+ "--listen-client-urls" , "http://0.0.0.0:" + port ,
43
+ "--advertise-client-urls" , "http://0.0.0.0:" + port ,
44
+ // the below added because of stability
45
+ "--initial-cluster" , "default=http://localhost:" + peerPort ,
46
+ "--initial-advertise-peer-urls" , "http://localhost:" + peerPort ,
47
+ "--listen-peer-urls" , "http://localhost:" + peerPort )
43
48
.start ();
44
49
Utils .redirectProcessOutputToLogger (etcdProcess .getInputStream (), etcdLog );
45
50
Utils .redirectProcessOutputToLogger (etcdProcess .getErrorStream (), etcdLog );
You can’t perform that action at this time.
0 commit comments