dcapwell commented on code in PR #57:
URL: https://github.com/apache/cassandra-accord/pull/57#discussion_r1294877042


##########
accord-core/src/test/java/accord/burn/BurnTest.java:
##########
@@ -200,13 +202,17 @@ static void burn(RandomSource random, TopologyFactory 
topologyFactory, List<Id>
         });
 
         Supplier<LongSupplier> nowSupplier = () -> {
-            RandomSource jitter = random.fork();
-            // TODO (expected): jitter should be random walk with intermittent 
long periods
-            return () -> Math.max(0, delayQueue.nowInMillis() + 
(jitter.nextInt(10) - 5));
+            RandomSource forked = random.fork();
+            Gen.LongGen jitter = FrequentLargeRange.builder(forked)
+                                                   .raitio(1, 5)
+                                                   .small(50, 5000, 
TimeUnit.MICROSECONDS)
+                                                   .large(1, 10, 
TimeUnit.MILLISECONDS)
+                                                   .build();
+            return () -> Math.max(0, queue.nowInMillis() + 
jitter.nextLong(forked));
         };
 
         StrictSerializabilityVerifier strictSerializable = new 
StrictSerializabilityVerifier(keyCount);
-        SimulatedDelayedExecutorService globalExecutor = new 
SimulatedDelayedExecutorService(queue, agent, random.fork());
+        SimulatedDelayedExecutorService globalExecutor = new 
SimulatedDelayedExecutorService(queue, agent);

Review Comment:
   the delay logic was pushed to the queue, so no longer needs



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