HuangZhenQiu commented on code in PR #26640:
URL: https://github.com/apache/flink/pull/26640#discussion_r2150240848


##########
flink-state-backends/flink-statebackend-rocksdb/src/test/java/org/apache/flink/state/rocksdb/RocksDBStateUploaderTest.java:
##########
@@ -233,6 +238,32 @@ void testMultiThreadUploadCorrectly() throws Exception {
         }
     }
 
+    @Test
+    void testApplyJitter() throws Exception {
+        try (RocksDBStateUploader rocksDBStateUploader =
+                new RocksDBStateUploader(1, Duration.ofMillis(1000L))) {
+            rocksDBStateUploader.applyJitter(
+                    sleepTime -> {
+                        assertThat(sleepTime).isGreaterThan(0);
+                        assertThat(sleepTime).isLessThanOrEqualTo(1000);
+                    });
+
+            long startTime = System.currentTimeMillis();
+            rocksDBStateUploader.applyJitter(new 
RocksDBStateUploader.JitterConsumer());
+            assertThat(System.currentTimeMillis()).isGreaterThan(startTime);

Review Comment:
   make sense. I can remove the last assert.



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

Reply via email to