Skip to content

Commit 97fc028

Browse files
authored
[7.x] Skip Google Cloud Storage tests on JDK (#74763)
See #53119 for more context about why those tests are muted on JDK8. They start failing more often recently now #74313 and #74620 have been merged, as reported in #74739.
1 parent 2fd775a commit 97fc028

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

plugins/repository-gcs/src/internalClusterTest/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageThirdPartyTests.java

+6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import org.elasticsearch.common.settings.Settings;
1616
import org.elasticsearch.plugins.Plugin;
1717
import org.elasticsearch.repositories.AbstractThirdPartyRepositoryTestCase;
18+
import org.junit.BeforeClass;
1819

1920
import java.util.Base64;
2021
import java.util.Collection;
@@ -25,6 +26,11 @@
2526

2627
public class GoogleCloudStorageThirdPartyTests extends AbstractThirdPartyRepositoryTestCase {
2728

29+
@BeforeClass
30+
public static void skipJava8() {
31+
GoogleCloudStorageBlobStoreRepositoryTests.assumeNotJava8();
32+
}
33+
2834
@Override
2935
protected Collection<Class<? extends Plugin>> getPlugins() {
3036
return pluginList(GoogleCloudStoragePlugin.class);

x-pack/plugin/repositories-metering-api/qa/gcs/src/test/java/org/elasticsearch/xpack/repositories/metering/gcs/GCSRepositoriesMeteringIT.java

+10
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,23 @@
77
package org.elasticsearch.xpack.repositories.metering.gcs;
88

99
import org.elasticsearch.common.settings.Settings;
10+
import org.elasticsearch.jdk.JavaVersion;
1011
import org.elasticsearch.xpack.repositories.metering.AbstractRepositoriesMeteringAPIRestTestCase;
12+
import org.junit.BeforeClass;
1113

1214
import java.util.List;
1315
import java.util.Map;
1416

1517
public class GCSRepositoriesMeteringIT extends AbstractRepositoriesMeteringAPIRestTestCase {
1618

19+
@BeforeClass
20+
public static void skipJava8() {
21+
assumeFalse("This test is flaky on jdk8 - we suspect a JDK bug to trigger some assertion in the HttpServer implementation used " +
22+
"to emulate the server side logic of Google Cloud Storage. See https://bugs.openjdk.java.net/browse/JDK-8180754, " +
23+
"https://github.com/elastic/elasticsearch/pull/51933 and https://github.com/elastic/elasticsearch/issues/52906 " +
24+
"for more background on this issue.", JavaVersion.current().equals(JavaVersion.parse("8")));
25+
}
26+
1727
@Override
1828
protected String repositoryType() {
1929
return "gcs";

x-pack/plugin/searchable-snapshots/qa/gcs/src/test/java/org/elasticsearch/xpack/searchablesnapshots/GCSSearchableSnapshotsIT.java

+10
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,22 @@
88
package org.elasticsearch.xpack.searchablesnapshots;
99

1010
import org.elasticsearch.common.settings.Settings;
11+
import org.elasticsearch.jdk.JavaVersion;
12+
import org.junit.BeforeClass;
1113

1214
import static org.hamcrest.Matchers.blankOrNullString;
1315
import static org.hamcrest.Matchers.not;
1416

1517
public class GCSSearchableSnapshotsIT extends AbstractSearchableSnapshotsRestTestCase {
1618

19+
@BeforeClass
20+
public static void skipJava8() {
21+
assumeFalse("This test is flaky on jdk8 - we suspect a JDK bug to trigger some assertion in the HttpServer implementation used " +
22+
"to emulate the server side logic of Google Cloud Storage. See https://bugs.openjdk.java.net/browse/JDK-8180754, " +
23+
"https://github.com/elastic/elasticsearch/pull/51933 and https://github.com/elastic/elasticsearch/issues/52906 " +
24+
"for more background on this issue.", JavaVersion.current().equals(JavaVersion.parse("8")));
25+
}
26+
1727
@Override
1828
protected String writeRepositoryType() {
1929
return "gcs";

0 commit comments

Comments
 (0)