From 10747dfbc16e1e5c7c8dd7d89d5db5a4b162e7be Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 8 Feb 2021 22:56:57 +0000 Subject: [PATCH 1/4] Remove unused imports in RemoteClustersIT and InternalTestCluster This commit removes unused imports that are causing checkStyle failures. --- .../elasticsearch/cluster/remote/test/RemoteClustersIT.java | 3 --- .../main/java/org/elasticsearch/test/InternalTestCluster.java | 1 - 2 files changed, 4 deletions(-) diff --git a/qa/remote-clusters/src/test/java/org/elasticsearch/cluster/remote/test/RemoteClustersIT.java b/qa/remote-clusters/src/test/java/org/elasticsearch/cluster/remote/test/RemoteClustersIT.java index 586c2e6af66bf..aae4554399dcd 100644 --- a/qa/remote-clusters/src/test/java/org/elasticsearch/cluster/remote/test/RemoteClustersIT.java +++ b/qa/remote-clusters/src/test/java/org/elasticsearch/cluster/remote/test/RemoteClustersIT.java @@ -34,9 +34,6 @@ import java.io.IOException; -import static org.hamcrest.Matchers.equalTo; -import static org.junit.Assume.assumeThat; - public class RemoteClustersIT extends AbstractMultiClusterRemoteTestCase { @Before diff --git a/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java b/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java index 4ce226f94499c..19c2cdac748c8 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java +++ b/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java @@ -164,7 +164,6 @@ import static org.elasticsearch.discovery.zen.ElectMasterService.DISCOVERY_ZEN_MINIMUM_MASTER_NODES_SETTING; import static org.elasticsearch.test.ESTestCase.assertBusy; import static org.elasticsearch.test.ESTestCase.getTestTransportType; -import static org.elasticsearch.test.ESTestCase.inFipsJvm; import static org.elasticsearch.test.ESTestCase.randomFrom; import static org.elasticsearch.test.NodeRoles.dataOnlyNode; import static org.elasticsearch.test.NodeRoles.masterOnlyNode; From 3093222961a67f6a49ef8c92bf02c90f218c5107 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 8 Feb 2021 23:12:01 +0000 Subject: [PATCH 2/4] [DOCS] temporarily comment verifyDocsLuceneVersion in qa:verify-version-constants Docs have temporarily been removed. This commit can be reverted if the OSS docs are restored. --- qa/verify-version-constants/build.gradle | 48 ++++++++++++------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/qa/verify-version-constants/build.gradle b/qa/verify-version-constants/build.gradle index a7c6d9910fde8..0e3b671d6a4ee 100644 --- a/qa/verify-version-constants/build.gradle +++ b/qa/verify-version-constants/build.gradle @@ -47,28 +47,28 @@ for (Version bwcVersion : BuildParams.bwcVersions.indexCompatible) { } } -tasks.register("verifyDocsLuceneVersion") { - doFirst { - File docsVersionsFile = rootProject.file('docs/Versions.asciidoc') - List versionLines = docsVersionsFile.readLines('UTF-8') - String docsLuceneVersion = null - for (String line : versionLines) { - if (line.startsWith(':lucene_version:')) { - docsLuceneVersion = line.split()[1] - } - } - if (docsLuceneVersion == null) { - throw new GradleException('Could not find lucene version in docs version file') - } - String expectedLuceneVersion = VersionProperties.lucene - // remove potential -snapshot-{gitrev} suffix - expectedLuceneVersion -= ~/-snapshot-[0-9a-f]+$/ - if (docsLuceneVersion != expectedLuceneVersion) { - throw new GradleException("Lucene version in docs [${docsLuceneVersion}] does not match version.properties [${expectedLuceneVersion}]") - } - } -} +//tasks.register("verifyDocsLuceneVersion") { +// doFirst { +// File docsVersionsFile = rootProject.file('docs/Versions.asciidoc') +// List versionLines = docsVersionsFile.readLines('UTF-8') +// String docsLuceneVersion = null +// for (String line : versionLines) { +// if (line.startsWith(':lucene_version:')) { +// docsLuceneVersion = line.split()[1] +// } +// } +// if (docsLuceneVersion == null) { +// throw new GradleException('Could not find lucene version in docs version file') +// } +// String expectedLuceneVersion = VersionProperties.lucene +// // remove potential -snapshot-{gitrev} suffix +// expectedLuceneVersion -= ~/-snapshot-[0-9a-f]+$/ +// if (docsLuceneVersion != expectedLuceneVersion) { +// throw new GradleException("Lucene version in docs [${docsLuceneVersion}] does not match version.properties [${expectedLuceneVersion}]") +// } +// } +//} -tasks.named("check").configure { - dependsOn verifyDocsLuceneVersion -} +//tasks.named("check").configure { +// dependsOn verifyDocsLuceneVersion +//} From c69309e2e98cd05e7154726d97004f6ec45723c7 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 8 Feb 2021 23:29:55 +0000 Subject: [PATCH 3/4] Mute AnalyticsAggsIT test failure AnalyticsAggsIT needs to be removed. This mutes the test until removal is complete. --- .../org/elasticsearch/client/analytics/AnalyticsAggsIT.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/analytics/AnalyticsAggsIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/analytics/AnalyticsAggsIT.java index 946c707754e04..39e8377415e5d 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/analytics/AnalyticsAggsIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/analytics/AnalyticsAggsIT.java @@ -19,6 +19,7 @@ package org.elasticsearch.client.analytics; +import org.apache.lucene.util.LuceneTestCase.BadApple; import org.elasticsearch.action.bulk.BulkRequest; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.search.SearchRequest; @@ -41,6 +42,7 @@ import static org.hamcrest.Matchers.hasEntry; import static org.hamcrest.Matchers.hasSize; +@BadApple(bugUrl = "https://github.com/opendistro-for-elasticsearch/search/issues/51") public class AnalyticsAggsIT extends ESRestHighLevelClientTestCase { public void testStringStats() throws IOException { BulkRequest bulk = new BulkRequest("test").setRefreshPolicy(RefreshPolicy.IMMEDIATE); From 50ebc9f7f23ca06fb4f6fdefdf1767c5f0467a5d Mon Sep 17 00:00:00 2001 From: Harold Wang Date: Tue, 9 Feb 2021 12:24:10 -0800 Subject: [PATCH 4/4] Remove testSearchWithBasicLicensedQuery which is part of Basic license --- .../test/java/org/elasticsearch/client/SearchIT.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/SearchIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/SearchIT.java index ccbde16c90a85..fc356dd94a30d 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/SearchIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/SearchIT.java @@ -1380,16 +1380,6 @@ public void testCountAllIndicesMatchQuery() throws IOException { assertEquals(3, countResponse.getCount()); } - public void testSearchWithBasicLicensedQuery() throws IOException { - SearchRequest searchRequest = new SearchRequest("index"); - SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder(); - searchRequest.source(searchSourceBuilder); - SearchResponse searchResponse = execute(searchRequest, highLevelClient()::search, highLevelClient()::searchAsync); - assertSearchHeader(searchResponse); - assertFirstHit(searchResponse, hasId("2")); - assertSecondHit(searchResponse, hasId("1")); - } - private static void assertCountHeader(CountResponse countResponse) { assertEquals(0, countResponse.getSkippedShards()); assertEquals(0, countResponse.getFailedShards());