Tibor17 commented on code in PR #505:
URL: https://github.com/apache/maven-surefire/pull/505#discussion_r844514843


##########
surefire-its/src/test/java/org/apache/maven/surefire/its/RunOrderIT.java:
##########
@@ -97,7 +97,17 @@ public void testRandomJUnit4SameSeed()
             }
         }
     }
-    
+
+    @Test
+    public void testRandomJUnit4PrintSeed()
+    {
+        long seed = 0L;
+        OutputValidator validator = executeWithRandomOrder( "junit4", seed );
+        validator.verifyTextInLog( "To reproduce ordering use flag" );
+        validator = executeWithRandomOrder( "junit4" );
+        validator.verifyTextInLog( "To reproduce ordering use flag" );

Review Comment:
   @delanym 
   We are doing these things twice. The seed is set to `System.nanoTime()` if 
it was NULL, see `DefaultRunOrderCalculator`.
   This means that the only work here should be different, we should change the 
condition in the IF statement but nothing more. WDYT? Pls comment on this!
   ```
           Long runOrderRandomSeed = runOrderParameters.getRunOrderRandomSeed();
           if ( runOrderRandomSeed == null )
           {
               runOrderRandomSeed = System.nanoTime();
               runOrderParameters.setRunOrderRandomSeed( runOrderRandomSeed );
           }
           this.random = new Random( runOrderRandomSeed );
   ```



-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to