From 1777ccd770554ec9081c25f4324a9b6543cb3477 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Wed, 27 Feb 2013 02:05:39 +0000 Subject: [PATCH] tests: fix git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1450578 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/solr/handler/TestReplicationHandler.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 87124d19e33..69eeaa41aad 100644 --- a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java +++ b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java @@ -515,6 +515,8 @@ public class TestReplicationHandler extends SolrTestCaseJ4 { slaveClient = createNewSolrServer(slaveJetty.getLocalPort()); masterClient.deleteByQuery("*:*"); + slaveClient.deleteByQuery("*:*"); + slaveClient.commit(); nDocs--; for (int i = 0; i < nDocs; i++) index(masterClient, "id", i, "name", "name = " + i); @@ -565,7 +567,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 { slaveClient.commit(); pullFromSlaveToMaster(); - rQuery(3, "*:*", slaveClient); + rQuery(nDocs, "*:*", masterClient); //get docs from slave and check if number is equal to master slaveQueryRsp = rQuery(nDocs, "*:*", slaveClient); @@ -596,12 +598,13 @@ public class TestReplicationHandler extends SolrTestCaseJ4 { assertVersions(); // now force a new index directory - for (int i = 0; i < 3; i++) + for (int i = 0; i < 4; i++) index(masterClient, "id", i, "name", "name = " + i); masterClient.commit(); pullFromSlaveToMaster(); + rQuery((int) slaveQueryResult.getNumFound(), "*:*", masterClient); //get docs from slave and check if number is equal to master slaveQueryRsp = rQuery(nDocs, "*:*", slaveClient);