dcapwell commented on code in PR #3441:
URL: https://github.com/apache/cassandra/pull/3441#discussion_r1691875345


##########
test/simulator/test/org/apache/cassandra/simulator/test/HarrySimulatorTest.java:
##########
@@ -504,43 +527,38 @@ public void shutdown()
     /**
      * Simulation entrypoint; syntax sugar for creating a simulation.
      */
-    static void simulate(Consumer<ClusterSimulation.Builder<HarrySimulation>> 
configure,
-                         Consumer<IInstanceConfig> instanceConfigUpdater,
-                         Configuration.ConfigurationBuilder harryConfig,
-                         String[] properties,
-                         Function<HarrySimulation, ActionSchedule.Work[]>... 
phases) throws IOException
+    void simulate(Consumer<ClusterSimulation.Builder<HarrySimulation>> 
configure,
+                  Consumer<IInstanceConfig> instanceConfigUpdater,
+                  Configuration.ConfigurationBuilder harryConfig,
+                  String[] properties,
+                  Function<HarrySimulation, ActionSchedule.Work[]>... phases) 
throws IOException
     {
         try (WithProperties p = new WithProperties().with(properties))
         {
             HarrySimulationBuilder factory = new 
HarrySimulationBuilder(harryConfig, instanceConfigUpdater);
 
             SimulationRunner.beforeAll();
-            long seed = System.currentTimeMillis();
-            // Development seed:
-            //long seed = 1687184561194L;
-            System.out.println("Simulation seed: " + seed + "L");
+            long seed = 
SimulationRunner.parseHex(Optional.ofNullable(this.seed)).orElseGet(() -> new 
Random().nextLong());
+            logger.info("Seed 0x{}", Long.toHexString(seed));

Review Comment:
   this is for consistency... having this test do seeds differently than the 
other tests makes it harder for people to jump in and see what's going on.



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