test/jdk/jdk/net/RdmaSockets/rsocket/SocketOption/OptionsTest.java
author bpb
Wed, 06 Feb 2019 12:48:01 -0800
branchrsocket-branch
changeset 57156 81e4a12fd1a4
parent 57115 512e7cc6ccce
child 57160 c502c299d41e
permissions -rw-r--r--
rsocket-branch: change recent copyright year to 2019 and new files to 2019 only
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
57115
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
     1
/*
57156
81e4a12fd1a4 rsocket-branch: change recent copyright year to 2019 and new files to 2019 only
bpb
parents: 57115
diff changeset
     2
 * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
57115
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
     4
 *
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
     7
 * published by the Free Software Foundation.
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
     8
 *
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    13
 * accompanied this code).
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    14
 *
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    18
 *
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    21
 * questions.
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    22
 */
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    23
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    24
/* @test
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    25
 * @bug 8195160
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    26
 * @summary Unit test for SocketOption
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    27
 * @requires (os.family == "linux")
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    28
 * @requires !vm.graal.enabled
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    29
 * @library .. /test/lib
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    30
 * @build RsocketTest
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    31
 * @run main/othervm OptionsTest
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    32
 */
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    33
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    34
import java.net.StandardProtocolFamily;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    35
import java.net.ServerSocket;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    36
import java.net.Socket;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    37
import java.net.SocketOption;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    38
import java.net.StandardSocketOptions;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    39
import java.util.Formatter;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    40
import java.util.Set;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    41
import jdk.net.RdmaSockets;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    42
import jdk.net.RdmaSocketOptions;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    43
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    44
import jtreg.SkippedException;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    45
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    46
public class OptionsTest {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    47
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    48
    static class Test {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    49
        Test(SocketOption<?> option, Object testValue) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    50
            this.option = option;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    51
            this.testValue = testValue;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    52
        }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    53
        static Test create (SocketOption<?> option, Object testValue) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    54
            return new Test(option, testValue);
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    55
        }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    56
        Object option;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    57
        Object testValue;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    58
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    59
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    60
    // The tests set the option using the new API, read back the set value
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    61
    // which could be diferent, and then use the legacy get API to check
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    62
    // these values are the same
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    63
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    64
    static Test[] socketTests = new Test[] {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    65
        Test.create(StandardSocketOptions.SO_SNDBUF, Integer.valueOf(10 * 100)),
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    66
        Test.create(StandardSocketOptions.SO_RCVBUF, Integer.valueOf(8 * 100)),
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    67
        Test.create(StandardSocketOptions.SO_REUSEADDR, Boolean.FALSE),
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    68
    };
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    69
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    70
    static Test[] serverSocketTests = new Test[] {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    71
        Test.create(StandardSocketOptions.SO_RCVBUF, Integer.valueOf(8 * 100)),
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    72
        Test.create(StandardSocketOptions.SO_REUSEADDR, Boolean.FALSE),
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    73
    };
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    74
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    75
    static Test[] rdmaSocketOptionTests = new Test[] {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    76
        Test.create(RdmaSocketOptions.RDMA_SQSIZE, Integer.valueOf(8 * 100)),
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    77
        Test.create(RdmaSocketOptions.RDMA_RQSIZE, Integer.valueOf(10 * 100)),
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    78
        Test.create(RdmaSocketOptions.RDMA_INLINE, Integer.valueOf(20 * 100)),
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    79
    };
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    80
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    81
    static void doSocketTests() throws Exception {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    82
        try {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    83
            Socket c = RdmaSockets.openSocket(StandardProtocolFamily.INET);
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    84
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    85
            for (int i = 0; i < socketTests.length; i++) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    86
                Test test = socketTests[i];
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    87
                c.setOption((SocketOption)test.option, test.testValue);
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    88
                Object getval = c.getOption((SocketOption)test.option);
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    89
                Object legacyget = legacyGetOption(Socket.class, c, test.option);
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    90
                if (!getval.equals(legacyget)) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    91
                    Formatter f = new Formatter();
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    92
                    f.format("S Err %d: %s/%s", i, getval, legacyget);
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    93
                    throw new RuntimeException(f.toString());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    94
                }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    95
            }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    96
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    97
            for (int i = 0; i < rdmaSocketOptionTests.length; i++) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    98
                Test test = rdmaSocketOptionTests[i];
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
    99
                c.setOption((SocketOption)test.option, test.testValue);
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   100
                Object getval = c.getOption((SocketOption)test.option);
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   101
                if (((Integer)getval).intValue() !=
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   102
                        ((Integer)test.testValue).intValue())
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   103
                    throw new RuntimeException("Test Failed");
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   104
            }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   105
        } catch (Exception e) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   106
            e.printStackTrace();
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   107
            throw new RuntimeException("Test Failed");
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   108
        }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   109
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   110
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   111
    static void doServerSocketTests() throws Exception {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   112
        try {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   113
            ServerSocket srv = RdmaSockets.openServerSocket(
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   114
                StandardProtocolFamily.INET);
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   115
            for (int i = 0; i < serverSocketTests.length; i++) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   116
                Test test = serverSocketTests[i];
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   117
                srv.setOption((SocketOption)test.option, test.testValue);
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   118
                Object getval = srv.getOption((SocketOption)test.option);
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   119
                Object legacyget = legacyGetOption(
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   120
                    ServerSocket.class, srv, test.option
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   121
                );
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   122
                if (!getval.equals(legacyget)) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   123
                    Formatter f = new Formatter();
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   124
                    f.format("SS Err %d: %s/%s", i, getval, legacyget);
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   125
                    throw new RuntimeException(f.toString());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   126
                }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   127
            }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   128
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   129
            for (int i = 0; i < rdmaSocketOptionTests.length; i++) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   130
                Test test = rdmaSocketOptionTests[i];
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   131
                srv.setOption((SocketOption)test.option, test.testValue);
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   132
                Object getval = srv.getOption((SocketOption)test.option);
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   133
                if (((Integer)getval).intValue() != 
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   134
                        ((Integer)test.testValue).intValue())
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   135
                    throw new RuntimeException("Test Failed");
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   136
            }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   137
        } catch (Exception e) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   138
            e.printStackTrace();
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   139
            throw new RuntimeException("Test Failed");
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   140
        }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   141
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   142
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   143
    static Object legacyGetOption(
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   144
        Class<?> type, Object s, Object option)
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   145
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   146
        throws Exception
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   147
    {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   148
        if (type.equals(Socket.class)) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   149
            Socket socket = (Socket)s;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   150
            Set<SocketOption<?>> options = socket.supportedOptions();
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   151
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   152
            if (option.equals(StandardSocketOptions.SO_SNDBUF)) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   153
                return Integer.valueOf(socket.getSendBufferSize());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   154
            } else if (option.equals(StandardSocketOptions.SO_RCVBUF)) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   155
                return Integer.valueOf(socket.getReceiveBufferSize());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   156
            } else if (option.equals(StandardSocketOptions.SO_REUSEADDR)) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   157
                return Boolean.valueOf(socket.getReuseAddress());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   158
            } else if (option.equals(StandardSocketOptions.TCP_NODELAY)) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   159
                return Boolean.valueOf(socket.getTcpNoDelay());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   160
            } else {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   161
                throw new RuntimeException("unexecpted socket option");
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   162
            }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   163
        } else if  (type.equals(ServerSocket.class)) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   164
            ServerSocket socket = (ServerSocket)s;
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   165
            Set<SocketOption<?>> options = socket.supportedOptions();
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   166
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   167
            if (option.equals(StandardSocketOptions.SO_RCVBUF)) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   168
                return Integer.valueOf(socket.getReceiveBufferSize());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   169
            } else if (option.equals(StandardSocketOptions.SO_REUSEADDR)) {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   170
                return Boolean.valueOf(socket.getReuseAddress());
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   171
            } else {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   172
                throw new RuntimeException("unexecpted socket option");
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   173
            }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   174
        }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   175
        throw new RuntimeException("unexecpted socket type");
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   176
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   177
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   178
    public static void main(String args[]) throws Exception {
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   179
        if (!RsocketTest.isRsocketAvailable())
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   180
            throw new SkippedException("rsocket is not available");
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   181
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   182
        doSocketTests();
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   183
        doServerSocketTests();
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   184
    }
512e7cc6ccce Initial load of JEP 337 implementation
alanb
parents:
diff changeset
   185
}