< prev index next >

test/java/nio/channels/SocketChannel/VectorIO.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -20,25 +20,27 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
 /* @test
- * @summary Test socketchannel vector IO
- * @library ..
+ * @summary Test socketchannel vector IO (use -Dseed=X to set PRNG seed)
+ * @library .. /lib/testlibrary/
+ * @build jdk.testlibrary.RandomFactory
+ * @run main VectorIO
  * @key randomness
  */
 
 import java.io.*;
 import java.net.*;
 import java.nio.*;
 import java.nio.channels.*;
 import java.util.*;
-
+import jdk.testlibrary.RandomFactory;
 
 public class VectorIO {
 
-    static Random generator = new Random();
+    private static Random generator = RandomFactory.getRandom();
 
     static int testSize;
 
     public static void main(String[] args) throws Exception {
         testSize = 1;

@@ -98,12 +100,10 @@
     }
 
     static class Server
         extends TestThread
     {
-        static Random generator = new Random();
-
         final int testSize;
         final ServerSocketChannel ssc;
 
         Server(int testSize) throws IOException {
             super("Server " + testSize);
< prev index next >