8080711: Prepare sun/nio/cs/FindEncoderBugs.java to find intermittent failures
authordarcy
Tue, 19 May 2015 18:33:08 -0700
changeset 30679 a28f774095fc
parent 30678 a8b7fd8ede97
child 30680 ddb6897152bf
8080711: Prepare sun/nio/cs/FindEncoderBugs.java to find intermittent failures Reviewed-by: rriggs
jdk/test/sun/nio/cs/FindEncoderBugs.java
--- a/jdk/test/sun/nio/cs/FindEncoderBugs.java	Tue May 19 13:30:03 2015 -0700
+++ b/jdk/test/sun/nio/cs/FindEncoderBugs.java	Tue May 19 18:33:08 2015 -0700
@@ -25,15 +25,18 @@
  * @test
  * @bug 6233345 6381699 6381702 6381705 6381706
  * @summary Encode many char sequences in many ways
+ * @library /lib/testlibrary/
+ * @build jdk.testlibrary.*
  * @run main/timeout=1200 FindEncoderBugs
  * @author Martin Buchholz
- * @key randomness
+ * @key randomness intermittent
  */
 
 import java.util.*;
 import java.util.regex.*;
 import java.nio.*;
 import java.nio.charset.*;
+import jdk.testlibrary.RandomFactory;
 
 public class FindEncoderBugs {
 
@@ -456,7 +459,7 @@
         }
     }
 
-    private final static Random rnd = new Random();
+    private final static Random rnd = RandomFactory.getRandom();
     private static char randomChar() {
         return (char) rnd.nextInt(Character.MAX_VALUE);
     }