Hello,

The test sun/nio/cs/FindEncoderBugs.java has some intermittent failures; I'd like to update it to use the random number library to help track those failures down.

Patch below.

Thanks,

-Joe

diff -r b1a68681ccac test/sun/nio/cs/FindEncoderBugs.java
--- a/test/sun/nio/cs/FindEncoderBugs.java    Tue May 19 13:30:03 2015 -0700
+++ b/test/sun/nio/cs/FindEncoderBugs.java    Tue May 19 15:04:20 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);
     }

Reply via email to