Skip to content

Commit 8a932a3

Browse files
committed
Skip Google Cloud Storage tests on JDK
See elastic#53119 for more context. Also relates elastic#74739.
1 parent 903a21c commit 8a932a3

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

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

+7
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
import org.elasticsearch.common.settings.MockSecureSettings;
1414
import org.elasticsearch.common.settings.SecureSettings;
1515
import org.elasticsearch.common.settings.Settings;
16+
import org.elasticsearch.jdk.JavaVersion;
1617
import org.elasticsearch.plugins.Plugin;
1718
import org.elasticsearch.repositories.AbstractThirdPartyRepositoryTestCase;
19+
import org.junit.BeforeClass;
1820

1921
import java.util.Base64;
2022
import java.util.Collection;
@@ -25,6 +27,11 @@
2527

2628
public class GoogleCloudStorageThirdPartyTests extends AbstractThirdPartyRepositoryTestCase {
2729

30+
@BeforeClass
31+
public static void skipJava8() {
32+
GoogleCloudStorageBlobStoreRepositoryTests.assumeNotJava8();
33+
}
34+
2835
@Override
2936
protected Collection<Class<? extends Plugin>> getPlugins() {
3037
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)