Skip to content

Commit

Permalink
Unmute kerberos tests for jdk 15 and mute for jdk 8u262 (elastic#60279)
Browse files Browse the repository at this point in the history
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: elastic#56507
  • Loading branch information
ywangd committed Jul 29, 2020
1 parent 467e7b1 commit e725e22
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import org.apache.http.HttpEntity;
import org.apache.http.HttpHost;
import org.elasticsearch.bootstrap.JavaVersion;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.RestClient;
Expand Down Expand Up @@ -90,13 +89,13 @@ public void setupRoleMapping() throws IOException {
assertOK(response);
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/56507")
public void testSuppressedOnJDK15() {
assumeTrue("AwaitsFix on JDK15", JavaVersion.current().compareTo(JavaVersion.parse("15")) < 0);
// JDK 8u262 shipped with a NPE in Kerberos code, see https://github.com/elastic/elasticsearch/issues/56507
public void testSuppressedOnJDK8u262() {
assumeFalse("Cannot run on JDK 8u262", "1.8.0_262".equals(System.getProperty("java.version")));
}

public void testLoginByKeytab() throws IOException, PrivilegedActionException {
testSuppressedOnJDK15();
testSuppressedOnJDK8u262();
final String userPrincipalName = System.getProperty(TEST_USER_WITH_KEYTAB_KEY);
final String keytabPath = System.getProperty(TEST_USER_WITH_KEYTAB_PATH_KEY);
final boolean enabledDebugLogs = Boolean.parseBoolean(System.getProperty(ENABLE_KERBEROS_DEBUG_LOGS_KEY));
Expand All @@ -106,7 +105,7 @@ public void testLoginByKeytab() throws IOException, PrivilegedActionException {
}

public void testLoginByUsernamePassword() throws IOException, PrivilegedActionException {
testSuppressedOnJDK15();
testSuppressedOnJDK8u262();
final String userPrincipalName = System.getProperty(TEST_USER_WITH_PWD_KEY);
final String password = System.getProperty(TEST_USER_WITH_PWD_PASSWD_KEY);
final boolean enabledDebugLogs = Boolean.parseBoolean(System.getProperty(ENABLE_KERBEROS_DEBUG_LOGS_KEY));
Expand All @@ -116,7 +115,7 @@ public void testLoginByUsernamePassword() throws IOException, PrivilegedActionEx
}

public void testGetOauth2TokenInExchangeForKerberosTickets() throws PrivilegedActionException, GSSException, IOException {
testSuppressedOnJDK15();
testSuppressedOnJDK8u262();
final String userPrincipalName = System.getProperty(TEST_USER_WITH_PWD_KEY);
final String password = System.getProperty(TEST_USER_WITH_PWD_PASSWD_KEY);
final boolean enabledDebugLogs = Boolean.parseBoolean(System.getProperty(ENABLE_KERBEROS_DEBUG_LOGS_KEY));
Expand Down

0 comments on commit e725e22

Please sign in to comment.