Skip to content

Commit 8e0d019

Browse files
author
SendaoYan
committed
8338630: Test java/nio/channels/DatagramChannel/SendReceiveMaxSize.java timeout
Reviewed-by: dfuchs, jpai, djelinski
1 parent e06652a commit 8e0d019

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

test/lib/jdk/test/lib/NetworkConfiguration.java

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -127,8 +127,8 @@ public static boolean isSameInterface(NetworkInterface ni1, NetworkInterface ni2
127127

128128
public static boolean isTestable(NetworkInterface nif) {
129129
if (Platform.isOSX()) {
130-
if (nif.getName().contains("awdl")) {
131-
return false; // exclude awdl
130+
if (nif.getName().contains("awdl") || nif.getName().contains("docker")) {
131+
return false; // exclude awdl or docker
132132
}
133133
// filter out interfaces that only have link-local IPv6 addresses
134134
// on macOS interfaces like 'en6' fall in this category and
@@ -145,6 +145,13 @@ public static boolean isTestable(NetworkInterface nif) {
145145
return false;
146146
}
147147
}
148+
149+
if (Platform.isLinux()) {
150+
String dName = nif.getDisplayName();
151+
if (dName != null && dName.contains("docker")) {
152+
return false;
153+
}
154+
}
148155
return true;
149156
}
150157

0 commit comments

Comments
 (0)