mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-16 18:04:52 +00:00
Run testExtendedSocketOptions only on JDK11+ (#44055)
This functionality only works on JDK 11 or higher
This commit is contained in:
parent
5b1b146099
commit
a453cd489e
@ -17,6 +17,7 @@
|
||||
package org.elasticsearch.core.internal.net;
|
||||
|
||||
import org.apache.lucene.util.Constants;
|
||||
import org.elasticsearch.bootstrap.JavaVersion;
|
||||
import org.elasticsearch.core.internal.io.IOUtils;
|
||||
import org.elasticsearch.test.ESTestCase;
|
||||
|
||||
@ -24,6 +25,7 @@ public class NetUtilsTests extends ESTestCase {
|
||||
|
||||
public void testExtendedSocketOptions() {
|
||||
assumeTrue("JDK possibly not supported", Constants.JVM_NAME.contains("HotSpot") || Constants.JVM_NAME.contains("OpenJDK"));
|
||||
assumeTrue("JDK version not supported", JavaVersion.current().compareTo(JavaVersion.parse("11")) >= 0);
|
||||
assumeTrue("Platform possibly not supported", IOUtils.LINUX || IOUtils.MAC_OS_X);
|
||||
assertNotNull(NetUtils.getTcpKeepIdleSocketOptionOrNull());
|
||||
assertNotNull(NetUtils.getTcpKeepIntervalSocketOptionOrNull());
|
||||
|
Loading…
x
Reference in New Issue
Block a user