goiri commented on code in PR #5495:
URL: https://github.com/apache/hadoop/pull/5495#discussion_r1153848968


##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/util/TestSampleQuantiles.java:
##########
@@ -37,8 +37,10 @@ public class TestSampleQuantiles {
       new Quantile(0.95, 0.005), new Quantile(0.99, 0.001) };
 
   SampleQuantiles estimator;
+  Random rnd = new Random(0xDEADDEAD);
+  final static int NUM_REPEATS = 10;
 
-  @Before
+    @Before

Review Comment:
   Spacing is wrong?



##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/util/TestSampleQuantiles.java:
##########
@@ -92,22 +94,21 @@ public void testClear() throws IOException {
   @Test
   public void testQuantileError() throws IOException {
     final int count = 100000;
-    Random r = new Random(0xDEADDEAD);
     int[] values = new int[count];
     for (int i = 0; i < count; i++) {
       values[i] = i + 1;
     }
 
-    // Do 10 shuffle/insert/check cycles
-    for (int i = 0; i < 10; i++) {
+    // Repeat shuffle/insert/check cycles 10 times
+    for (int i = 0; i < NUM_REPEATS; i++) {
 
       // Shuffle  
-      Collections.shuffle(Arrays.asList(values), r);
+      Collections.shuffle(Arrays.asList(values), rnd);

Review Comment:
   Check the checkstyle and empty line warnings.



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