< prev index next >

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

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


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


< prev index next >