You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/04/06 17:05:26 UTC

[GitHub] [maven-surefire] slawekjaranowski commented on a diff in pull request #505: [SUREFIRE-2055] Always show random seed

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


##########
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:
   please consider to split into two test, eg:
   - testRandomJUnit4PrintSeedWithGivenSeed
   - testRandomJUnit4PrintSeedWithNoGivenSeed
   



##########
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:
   please consider to split into two test, eg:
   - testRandomJUnit4PrintSeedWithGivenSeed
   - testRandomJUnit4PrintSeedWithNoGivenSeed
   



-- 
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-unsubscribe@maven.apache.org

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