lukasz-antoniak commented on code in PR #1958:
URL: 
https://github.com/apache/cassandra-java-driver/pull/1958#discussion_r1758216396


##########
test-infra/src/main/java/com/datastax/oss/driver/api/testinfra/ccm/CcmBridge.java:
##########
@@ -101,22 +102,30 @@ public class CcmBridge implements AutoCloseable {
       createTempStore(DEFAULT_SERVER_LOCALHOST_KEYSTORE_PATH);
 
   // major DSE versions
-  private static final Version V6_0_0 = Version.parse("6.0.0");
-  private static final Version V5_1_0 = Version.parse("5.1.0");
-  private static final Version V5_0_0 = Version.parse("5.0.0");
+  public static final Version V6_0_0 = Version.parse("6.0.0");
+  public static final Version V5_1_0 = Version.parse("5.1.0");
+  public static final Version V5_0_0 = Version.parse("5.0.0");
 
   // mapped C* versions from DSE versions
-  private static final Version V4_0_0 = Version.parse("4.0.0");
-  private static final Version V3_10 = Version.parse("3.10");
-  private static final Version V3_0_15 = Version.parse("3.0.15");
-  private static final Version V2_1_19 = Version.parse("2.1.19");
+  public static final Version V4_0_0 = Version.parse("4.0.0");
+  public static final Version V3_10 = Version.parse("3.10");
+  public static final Version V3_0_15 = Version.parse("3.0.15");
+  public static final Version V2_1_19 = Version.parse("2.1.19");
+
+  // mapped C* versions from HCD versions
+  public static final Version V4_0_11 = Version.parse("4.0.11");
 
   static {
-    if (DSE_ENABLEMENT) {
-      LOG.info("CCM Bridge configured with DSE version {}", VERSION);
-    } else {
-      LOG.info("CCM Bridge configured with Apache Cassandra version {}", 
VERSION);
+    distribution = BackendType.CASSANDRA; // default distribution
+    for (BackendType backendType : BackendType.values()) {
+      String enableFlag = "ccm." + backendType.name().toLowerCase();
+      // look for system properties like 'ccm.dse', 'ccm.hcd' etc.
+      if (Boolean.parseBoolean(System.getProperty(enableFlag, "false"))) {
+        distribution = backendType;
+        break;
+      }

Review Comment:
   Totally agreed. I wanted to preserve backward compatibility of flags, but 
true this makes far more sense.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to