Unmute kerberos tests for jdk 15 and mute for jdk 8u262 (#60279)

The JDK bug (https://bugs.openjdk.java.net/browse/JDK-8246193) is fixed since b26.
The tests can be unmuted since we are already using b33. However the same bug is now
affecting jdk 8u262, which is the base for current Zulu jdk 8.48. This PR mute the tests
for this specific jdk version.

Relates: #56507
This commit is contained in:
Yang Wang 2020-07-29 12:57:00 +10:00 committed by GitHub
parent 07aede135d
commit 3a0e7f4294
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 7 deletions

View File

@ -8,7 +8,6 @@ package org.elasticsearch.xpack.security.authc.kerberos;
import org.apache.http.HttpEntity; import org.apache.http.HttpEntity;
import org.apache.http.HttpHost; import org.apache.http.HttpHost;
import org.elasticsearch.bootstrap.JavaVersion;
import org.elasticsearch.client.Request; import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response; import org.elasticsearch.client.Response;
import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestClient;
@ -90,13 +89,13 @@ public class KerberosAuthenticationIT extends ESRestTestCase {
assertOK(response); assertOK(response);
} }
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/56507") // JDK 8u262 shipped with a NPE in Kerberos code, see https://github.com/elastic/elasticsearch/issues/56507
public void testSuppressedOnJDK15() { public void testSuppressedOnJDK8u262() {
assumeTrue("AwaitsFix on JDK15", JavaVersion.current().compareTo(JavaVersion.parse("15")) < 0); assumeFalse("Cannot run on JDK 8u262", "1.8.0_262".equals(System.getProperty("java.version")));
} }
public void testLoginByKeytab() throws IOException, PrivilegedActionException { public void testLoginByKeytab() throws IOException, PrivilegedActionException {
testSuppressedOnJDK15(); testSuppressedOnJDK8u262();
final String userPrincipalName = System.getProperty(TEST_USER_WITH_KEYTAB_KEY); final String userPrincipalName = System.getProperty(TEST_USER_WITH_KEYTAB_KEY);
final String keytabPath = System.getProperty(TEST_USER_WITH_KEYTAB_PATH_KEY); final String keytabPath = System.getProperty(TEST_USER_WITH_KEYTAB_PATH_KEY);
final boolean enabledDebugLogs = Boolean.parseBoolean(System.getProperty(ENABLE_KERBEROS_DEBUG_LOGS_KEY)); final boolean enabledDebugLogs = Boolean.parseBoolean(System.getProperty(ENABLE_KERBEROS_DEBUG_LOGS_KEY));
@ -106,7 +105,7 @@ public class KerberosAuthenticationIT extends ESRestTestCase {
} }
public void testLoginByUsernamePassword() throws IOException, PrivilegedActionException { public void testLoginByUsernamePassword() throws IOException, PrivilegedActionException {
testSuppressedOnJDK15(); testSuppressedOnJDK8u262();
final String userPrincipalName = System.getProperty(TEST_USER_WITH_PWD_KEY); final String userPrincipalName = System.getProperty(TEST_USER_WITH_PWD_KEY);
final String password = System.getProperty(TEST_USER_WITH_PWD_PASSWD_KEY); final String password = System.getProperty(TEST_USER_WITH_PWD_PASSWD_KEY);
final boolean enabledDebugLogs = Boolean.parseBoolean(System.getProperty(ENABLE_KERBEROS_DEBUG_LOGS_KEY)); final boolean enabledDebugLogs = Boolean.parseBoolean(System.getProperty(ENABLE_KERBEROS_DEBUG_LOGS_KEY));
@ -116,7 +115,7 @@ public class KerberosAuthenticationIT extends ESRestTestCase {
} }
public void testGetOauth2TokenInExchangeForKerberosTickets() throws PrivilegedActionException, GSSException, IOException { public void testGetOauth2TokenInExchangeForKerberosTickets() throws PrivilegedActionException, GSSException, IOException {
testSuppressedOnJDK15(); testSuppressedOnJDK8u262();
final String userPrincipalName = System.getProperty(TEST_USER_WITH_PWD_KEY); final String userPrincipalName = System.getProperty(TEST_USER_WITH_PWD_KEY);
final String password = System.getProperty(TEST_USER_WITH_PWD_PASSWD_KEY); final String password = System.getProperty(TEST_USER_WITH_PWD_PASSWD_KEY);
final boolean enabledDebugLogs = Boolean.parseBoolean(System.getProperty(ENABLE_KERBEROS_DEBUG_LOGS_KEY)); final boolean enabledDebugLogs = Boolean.parseBoolean(System.getProperty(ENABLE_KERBEROS_DEBUG_LOGS_KEY));