Skip to content

Commit c534621

Browse files
committed
SPARKC-642 fix TwoNodeCluster integration test setup
ReplicaRepartitionedCassandraRDDSpec based on TwoNodeCluster was not working for DSE 6.8 as this db version relies on metadata dir. Before this change the metadata dir was shared among all the nodes in the cluster (which caused Gossip failures that eventually lead to test failure). After this change all the nodes in the cluster use separate metadata dirs. Additionally, autoboostrapping is now enabled as all the nodes in TwoNodeCluster need to have data from relevant parts of the token ring.
1 parent 5ff1ec3 commit c534621

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test-support/src/main/scala/com/datastax/spark/connector/ccm/mode/StandardModeExecutor.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,20 @@ private[mode] trait DefaultExecutor extends ClusterModeExecutor {
8181
})
8282

8383
config.nodes.foreach { i =>
84+
val node = s"node$i"
8485
val addArgs = Seq ("add",
85-
"-s",
86+
"-s", // every node is a seed node
87+
"-b", // autobootstrap is enabled
8688
"-j", config.jmxPort(i).toString,
8789
"-i", config.ipOfNode(i),
8890
"--remote-debug-port=0") ++
8991
dseFlag :+
90-
s"node$i"
92+
node
9193

9294
execute(addArgs: _*)
9395

9496
if (config.dseEnabled && config.getDseVersion.exists(_.compareTo(V6_8_5) >= 0)) {
95-
execute("updateconf", s"metadata_directory:${dir.toFile.getAbsolutePath}/metadata$i")
97+
execute(node, "updateconf", s"metadata_directory:${dir.toFile.getAbsolutePath}/metadata$i")
9698
}
9799
}
98100

0 commit comments

Comments
 (0)