Skip to content

Commit 676f15d

Browse files
authored
Mute kerberos tests for jdk 8u[262,271) (#60995) (#60998)
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.
1 parent 7a15d2a commit 676f15d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

x-pack/qa/kerberos-tests/src/test/java/org/elasticsearch/xpack/security/authc/kerberos/KerberosAuthenticationIT.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import java.security.PrivilegedExceptionAction;
3434
import java.util.List;
3535
import java.util.Map;
36+
import java.util.stream.IntStream;
3637

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

87-
// JDK 8u262 shipped with a NPE in Kerberos code, see https://github.com/elastic/elasticsearch/issues/56507
88+
// JDK 8u262 shipped with a NPE in Kerberos code and fixed in 8u271, see https://github.com/elastic/elasticsearch/issues/56507
8889
public void testSuppressedOnJDK8u262() {
89-
assumeFalse("Cannot run on JDK 8u262", "1.8.0_262".equals(System.getProperty("java.version")));
90+
final String javaVersion = System.getProperty("java.version");
91+
assumeFalse("Cannot run on JDK 8u[262, 271)",
92+
IntStream.range(262, 271).mapToObj(i -> "1.8.0_" + i).anyMatch(javaVersion::equals));
9093
}
9194

9295
public void testLoginByKeytab() throws IOException, PrivilegedActionException {

0 commit comments

Comments
 (0)