Elffuss BraidHub

kikocis/java-driver public

Base protocol version on getCassandraVersion()

Motiviation:

TestUtils.getDesiredProtocolVersion() previously based the C* version
on the 'cassandra.version' system property.   When testing with DSE,
this is actually the DSE version, which is normally greater than the
Cassandra version.

Instead use CCMBridge.getCassandraVersion() which returns the derived
Cassandra version based on the DSE version used.

Modifications:

Update TestUtils.getDesiredProtocolVersion() to use
CCMBridge.getCassandraVersion().

Result:

Derived Cassandra version used to determine ProtocolVersion instead of
cassandra.version system property.
Changeset4464c0c9d0d2f6d45beaa1fc0eb173faaae0766a779c828bc2080357a0b56aa1
AuthorAndrew Tolbert <andrew.tolbert@datastax.com> · 2016-12-07 11:44 -06:00
CommitterAndrew Tolbert <andrew.tolbert@datastax.com> · 2016-12-14 17:44 -06:00
Parents12df520b331a

Browse the files at this changeset

1 file changed

modified driver-core/src/test/java/com/datastax/driver/core/TestUtils.java +1 −1
@@ -739,7 +739,7 @@
739739 * @return The desired target protocol version based on the 'cassandra.version' System property.
740740 */
741741 public static ProtocolVersion getDesiredProtocolVersion() {
742- String version = System.getProperty("cassandra.version");
742+ String version = CCMBridge.getCassandraVersion();
743743 String[] versionArray = version.split("\\.|-");
744744 double major = Double.parseDouble(versionArray[0] + "." + versionArray[1]);
745745 if (major < 2.0) {