Skip to content

Commit

Permalink
Mute kerberos tests for jdk 8u[262,271) (#60995) (#60998)
Browse files Browse the repository at this point in the history
The Kerberos bug (JDK-8246193) is introduced in JDK 8u262 and fixed in 8u271.
This PR mute for any possible releases between these two versions.
  • Loading branch information
ywangd committed Aug 12, 2020
1 parent 7a15d2a commit 676f15d
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import java.security.PrivilegedExceptionAction;
import java.util.List;
import java.util.Map;
import java.util.stream.IntStream;

import static org.elasticsearch.common.xcontent.XContentHelper.convertToMap;
import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue;
Expand Down Expand Up @@ -84,9 +85,11 @@ public void setupRoleMapping() throws IOException {
assertOK(response);
}

// JDK 8u262 shipped with a NPE in Kerberos code, see https://github.com/elastic/elasticsearch/issues/56507
// JDK 8u262 shipped with a NPE in Kerberos code and fixed in 8u271, 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")));
final String javaVersion = System.getProperty("java.version");
assumeFalse("Cannot run on JDK 8u[262, 271)",
IntStream.range(262, 271).mapToObj(i -> "1.8.0_" + i).anyMatch(javaVersion::equals));
}

public void testLoginByKeytab() throws IOException, PrivilegedActionException {
Expand Down

0 comments on commit 676f15d

Please sign in to comment.