Skip to content

Commit cae7c72

Browse files
committed
Revert changes
1 parent f4da5f6 commit cae7c72

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

src/it/java/io/weaviate/containers/Weaviate.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff 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)

src/it/java/io/weaviate/integration/ClusterITest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)