File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -411,18 +411,14 @@ public void stop() {
411411 * @param raft RAFT port.
412412 */
413413 private void bindNodes (int gossip , int data , int raft ) {
414- var publicPort = leader .getExposedPorts ().get (0 );
415- var clusterSize = String .valueOf (nodes .size ());
414+ var publicPort = leader .getExposedPorts ().get (0 ); // see WeaviateContainer Testcontainer.
416415
417416 nodes .forEach (node -> node
418417 .withEnv ("CLUSTER_GOSSIP_BIND_PORT" , String .valueOf (gossip ))
419418 .withEnv ("CLUSTER_DATA_BIND_PORT" , String .valueOf (data ))
420- .withEnv ("RAFT_PORT" , String .valueOf (raft )));
419+ .withEnv ("RAFT_PORT" , String .valueOf (raft ))
420+ .withEnv ("RAFT_BOOTSTRAP_EXPECT" , "1" ));
421421
422- // Leader bootstraps the cluster
423- leader .withEnv ("RAFT_BOOTSTRAP_EXPECT" , clusterSize );
424-
425- // Followers join the existing cluster
426422 followers .forEach (node -> node
427423 .withEnv ("CLUSTER_JOIN" , leader .containerName + ":" + gossip )
428424 .withEnv ("RAFT_JOIN" , leader .containerName )
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ public void test_replicateLifecycle() throws IOException {
6565
6666 // We must create the collection first before any shards exist on the nodes.
6767 var nsThings = ns ("Things" );
68- client .collections .create (nsThings , c -> c . replication ( r -> r . replicationFactor ( 2 )) );
68+ client .collections .create (nsThings );
6969
7070 var nodes = client .cluster .listNodes (opt -> opt .verbosity (NodeVerbosity .VERBOSE ));
7171 Assertions .assertThat (nodes )
You can’t perform that action at this time.
0 commit comments