< prev index next >

test/java/nio/channels/DatagramChannel/Promiscuous.java

Print this page
rev 17325 : 8181761: add explicit @build actions for jdk.test.lib classes in all :tier2 tests
Reviewed-by: duke


   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23 
  24 /* @test
  25  * @bug 8014377
  26  * @summary Test for interference when two sockets are bound to the same
  27  *   port but joined to different multicast groups
  28  * @library /test/lib
  29  * @build Promiscuous







  30  * @run main Promiscuous
  31  * @run main/othervm -Djava.net.preferIPv4Stack=true Promiscuous
  32  * @key randomness
  33  */
  34 
  35 import java.nio.ByteBuffer;
  36 import java.nio.channels.*;
  37 import java.net.*;
  38 import static java.net.StandardProtocolFamily.*;
  39 import java.util.*;
  40 import java.io.IOException;
  41 import java.util.stream.Collectors;
  42 
  43 import jdk.test.lib.NetworkConfiguration;
  44 
  45 public class Promiscuous {
  46 
  47     static final Random rand = new Random();
  48 
  49     static final ProtocolFamily UNSPEC = new ProtocolFamily() {




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23 
  24 /* @test
  25  * @bug 8014377
  26  * @summary Test for interference when two sockets are bound to the same
  27  *   port but joined to different multicast groups
  28  * @library /test/lib
  29  * @build jdk.test.lib.NetworkConfiguration
  30  *        jdk.test.lib.Utils
  31  *        jdk.test.lib.Asserts
  32  *        jdk.test.lib.JDKToolFinder
  33  *        jdk.test.lib.JDKToolLauncher
  34  *        jdk.test.lib.Platform
  35  *        jdk.test.lib.process.*
  36  *        Promiscuous
  37  * @run main Promiscuous
  38  * @run main/othervm -Djava.net.preferIPv4Stack=true Promiscuous
  39  * @key randomness
  40  */
  41 
  42 import java.nio.ByteBuffer;
  43 import java.nio.channels.*;
  44 import java.net.*;
  45 import static java.net.StandardProtocolFamily.*;
  46 import java.util.*;
  47 import java.io.IOException;
  48 import java.util.stream.Collectors;
  49 
  50 import jdk.test.lib.NetworkConfiguration;
  51 
  52 public class Promiscuous {
  53 
  54     static final Random rand = new Random();
  55 
  56     static final ProtocolFamily UNSPEC = new ProtocolFamily() {


< prev index next >