test/jdk/java/net/Socket/InheritTimeout.java
changeset 54770 62b6e7587b1f
parent 49431 5812849b5027
child 54811 9db7c0f561a6
equal deleted inserted replaced
54769:925ee7a89325 54770:62b6e7587b1f
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug 4508149
    26  * @bug 4508149
       
    27  * @library /test/lib
    27  * @summary Setting ServerSocket.setSoTimeout shouldn't cause
    28  * @summary Setting ServerSocket.setSoTimeout shouldn't cause
    28  *          the timeout to be inherited by accepted connections
    29  *          the timeout to be inherited by accepted connections
    29  * @run main InheritTimeout
    30  * @run main InheritTimeout
    30  * @run main/othervm -Djava.net.preferIPv4Stack=true InheritTimeout
    31  * @run main/othervm -Djava.net.preferIPv4Stack=true InheritTimeout
    31  */
    32  */
    32 
    33 
    33 import java.net.*;
    34 import java.net.*;
    34 import java.io.InputStream;
    35 import java.io.InputStream;
       
    36 import jdk.test.lib.net.IPSupport;
    35 
    37 
    36 public class InheritTimeout {
    38 public class InheritTimeout {
    37 
    39 
    38     class Reaper extends Thread {
    40     class Reaper extends Thread {
    39         Socket s;
    41         Socket s;
    90             throw new Exception("Unexpected SocketTimeoutException throw!");
    92             throw new Exception("Unexpected SocketTimeoutException throw!");
    91         }
    93         }
    92    }
    94    }
    93 
    95 
    94    public static void main(String args[]) throws Exception {
    96    public static void main(String args[]) throws Exception {
       
    97         IPSupport.skipIfCurrentConfigurationIsInvalid();
    95         new InheritTimeout();
    98         new InheritTimeout();
    96    }
    99    }
    97 }
   100 }