From 46037dc67494a746857048399c02a6cf6f7a07c1 Mon Sep 17 00:00:00 2001 From: Steve Rowe Date: Thu, 19 Apr 2018 14:49:10 -0400 Subject: [PATCH] SOLR-6286: TestReplicationHandler.doTestReplicateAfterCoreReload(): stop checking for identical commits before/after master core reload; and make non-nightly mode test 10 docs instead of 0. --- solr/CHANGES.txt | 4 +++ .../solr/handler/TestReplicationHandler.java | 36 +++++++++---------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 298abad316e..be3f7042303 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -170,6 +170,10 @@ Bug Fixes * SOLR-12187: Replica should watch clusterstate and unload itself if its entry is removed (Cao Manh Dat) +* SOLR-6286: TestReplicationHandler.doTestReplicateAfterCoreReload(): stop checking for identical + commits before/after master core reload; and make non-nightly mode test 10 docs instead of 0. + (shalin, hossman, Mark Miller, Steve Rowe) + Optimizations ---------------------- diff --git a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java index 8c247547d11..e22f4f737a5 100644 --- a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java +++ b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java @@ -231,22 +231,22 @@ public class TestReplicationHandler extends SolrTestCaseJ4 { return details; } - private NamedList getCommits(SolrClient s) throws Exception { - - - ModifiableSolrParams params = new ModifiableSolrParams(); - params.set("command","commits"); - params.set("_trace","getCommits"); - params.set("qt",ReplicationHandler.PATH); - QueryRequest req = new QueryRequest(params); - - NamedList res = s.request(req); - - assertNotNull("null response from server", res); - - - return res; - } +// private NamedList getCommits(SolrClient s) throws Exception { +// +// +// ModifiableSolrParams params = new ModifiableSolrParams(); +// params.set("command","commits"); +// params.set("_trace","getCommits"); +// params.set("qt",ReplicationHandler.PATH); +// QueryRequest req = new QueryRequest(params); +// +// NamedList res = s.request(req); +// +// assertNotNull("null response from server", res); +// +// +// return res; +// } private NamedList getIndexVersion(SolrClient s) throws Exception { @@ -1239,7 +1239,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 { @Test public void doTestReplicateAfterCoreReload() throws Exception { - int docs = TEST_NIGHTLY ? 200000 : 0; + int docs = TEST_NIGHTLY ? 200000 : 10; //stop slave slaveJetty.stop(); @@ -1283,12 +1283,10 @@ public class TestReplicationHandler extends SolrTestCaseJ4 { assertEquals(null, cmp); Object version = getIndexVersion(masterClient).get("indexversion"); - NamedList commits = getCommits(masterClient); reloadCore(masterClient, "collection1"); assertEquals(version, getIndexVersion(masterClient).get("indexversion")); - assertEquals(commits.get("commits"), getCommits(masterClient).get("commits")); index(masterClient, "id", docs + 10, "name", "name = 1"); index(masterClient, "id", docs + 20, "name", "name = 2");