8338630: Test java/nio/channels/DatagramChannel/SendReceiveMaxSize.java timeout

Reviewed-by: dfuchs, jpai, djelinski
This commit is contained in:
SendaoYan 2024-08-23 06:26:24 +00:00
parent e06652ad3c
commit 8e0d0190ed

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -127,8 +127,8 @@ public class NetworkConfiguration {
public static boolean isTestable(NetworkInterface nif) {
if (Platform.isOSX()) {
if (nif.getName().contains("awdl")) {
return false; // exclude awdl
if (nif.getName().contains("awdl") || nif.getName().contains("docker")) {
return false; // exclude awdl or docker
}
// filter out interfaces that only have link-local IPv6 addresses
// on macOS interfaces like 'en6' fall in this category and
@ -145,6 +145,13 @@ public class NetworkConfiguration {
return false;
}
}
if (Platform.isLinux()) {
String dName = nif.getDisplayName();
if (dName != null && dName.contains("docker")) {
return false;
}
}
return true;
}