Skip to content

Commit 0f49f65

Browse files
author
SendaoYan
committed
8362855: Test java/net/ipv6tests/TcpTest.java should report SkippedException when there no ia4addr or ia6addr
Backport-of: 8fcbb110e9941af5fe162c6affff36e0bf652bda
1 parent 00c9b2e commit 0f49f65

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/jdk/java/net/ipv6tests/TcpTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,16 @@
3131
* @library /test/lib
3232
* @build jdk.test.lib.NetworkConfiguration
3333
* jdk.test.lib.Platform
34+
* jtreg.SkippedException
3435
* @run main TcpTest -d
3536
*/
3637

3738
import java.net.*;
3839
import java.io.*;
3940
import java.util.concurrent.TimeUnit;
4041

42+
import jtreg.SkippedException;
43+
4144
public class TcpTest extends Tests {
4245
static ServerSocket server, server1, server2;
4346
static Socket c1, c2, c3, s1, s2, s3;
@@ -62,12 +65,10 @@ public class TcpTest extends Tests {
6265
public static void main (String[] args) throws Exception {
6366
checkDebug(args);
6467
if (ia4addr == null) {
65-
System.out.println ("No IPV4 addresses: exiting test");
66-
return;
68+
throw new SkippedException("No IPV4 addresses: exiting test");
6769
}
6870
if (ia6addr == null) {
69-
System.out.println ("No IPV6 addresses: exiting test");
70-
return;
71+
throw new SkippedException("No IPV6 addresses: exiting test");
7172
}
7273
dprintln ("Local Addresses");
7374
dprintln (ia4addr.toString());

0 commit comments

Comments
 (0)