jacek-lewandowski commented on code in PR #2972:
URL: https://github.com/apache/cassandra/pull/2972#discussion_r1421285263


##########
test/distributed/org/apache/cassandra/distributed/impl/Instance.java:
##########
@@ -589,12 +592,20 @@ public void startup(ICluster cluster)
                 // 
org.apache.cassandra.distributed.impl.AbstractCluster.startup sets the 
exception handler for the thread
                 // so extract it to populate ExecutorFactory.Global
                 ExecutorFactory.Global.tryUnsafeSet(new 
ExecutorFactory.Default(Thread.currentThread().getContextClassLoader(), null, 
Thread.getDefaultUncaughtExceptionHandler()));
+
+                assert 
!FBUtilities.getReleaseVersionString().equals(FBUtilities.UNKNOWN_RELEASE_VERSION)
 : "Unknown version";
+                assert !FBUtilities.getReleaseVersionString().isEmpty() : 
"Empty version";
+                assert FBUtilities.getReleaseVersionString().contains(".") : 
"Invalid version: " + FBUtilities.getReleaseVersionString();
+
                 if (config.has(GOSSIP))
                 {
                     // TODO: hacky
-                    System.setProperty("cassandra.ring_delay_ms", "15000");
-                    System.setProperty("cassandra.consistent.rangemovement", 
"false");
-                    
System.setProperty("cassandra.consistent.simultaneousmoves.allow", "true");
+                    if (!RING_DELAY.isPresent())
+                        RING_DELAY.setLong(15000);
+                    if (!CONSISTENT_RANGE_MOVEMENT.isPresent())
+                        CONSISTENT_RANGE_MOVEMENT.setBoolean(false);
+                    if (!CONSISTENT_SIMULTANEOUS_MOVES_ALLOW.isPresent())
+                        CONSISTENT_SIMULTANEOUS_MOVES_ALLOW.setBoolean(true);

Review Comment:
   yup, will do that (as you can see, those nice methods, `isPresent, setXXX`, 
are the reasons why I prefer to use `CassandraRelevantProperties`, even if it 
is inconsistent or enforced



-- 
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