mirror of https://github.com/apache/lucene.git
SOLR-997 -- Wait for a longer time for slave to complete replication in TestReplicationHandler
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@769052 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
46b27f1033
commit
6ea022f90b
|
@ -413,6 +413,9 @@ Other Changes
|
||||||
|
|
||||||
28. Upgraded to Lucene 2.9-dev r768336 (shalin)
|
28. Upgraded to Lucene 2.9-dev r768336 (shalin)
|
||||||
|
|
||||||
|
29. SOLR-997: Wait for a longer time for slave to complete replication in TestReplicationHandler
|
||||||
|
(Mark Miller via shalin)
|
||||||
|
|
||||||
Build
|
Build
|
||||||
----------------------
|
----------------------
|
||||||
1. SOLR-776: Added in ability to sign artifacts via Ant for releases (gsingers)
|
1. SOLR-776: Added in ability to sign artifacts via Ant for releases (gsingers)
|
||||||
|
|
|
@ -133,6 +133,15 @@ public class TestReplicationHandler extends TestCase {
|
||||||
//get docs from slave and check if number is equal to master
|
//get docs from slave and check if number is equal to master
|
||||||
NamedList slaveQueryRsp = query("*:*", slaveClient);
|
NamedList slaveQueryRsp = query("*:*", slaveClient);
|
||||||
SolrDocumentList slaveQueryResult = (SolrDocumentList) slaveQueryRsp.get("response");
|
SolrDocumentList slaveQueryResult = (SolrDocumentList) slaveQueryRsp.get("response");
|
||||||
|
|
||||||
|
if(slaveQueryResult.getNumFound() == 0) {
|
||||||
|
//try sleeping again in case of slower comp
|
||||||
|
Thread.sleep(5000);
|
||||||
|
|
||||||
|
slaveQueryRsp = query("*:*", slaveClient);
|
||||||
|
slaveQueryResult = (SolrDocumentList) slaveQueryRsp.get("response");
|
||||||
|
}
|
||||||
|
|
||||||
assertEquals(500, slaveQueryResult.getNumFound());
|
assertEquals(500, slaveQueryResult.getNumFound());
|
||||||
|
|
||||||
//compare results
|
//compare results
|
||||||
|
@ -187,6 +196,15 @@ public class TestReplicationHandler extends TestCase {
|
||||||
//get docs from slave and check if number is equal to master
|
//get docs from slave and check if number is equal to master
|
||||||
NamedList slaveQueryRsp = query("*:*", slaveClient);
|
NamedList slaveQueryRsp = query("*:*", slaveClient);
|
||||||
SolrDocumentList slaveQueryResult = (SolrDocumentList) slaveQueryRsp.get("response");
|
SolrDocumentList slaveQueryResult = (SolrDocumentList) slaveQueryRsp.get("response");
|
||||||
|
|
||||||
|
if(slaveQueryResult.getNumFound() == 0) {
|
||||||
|
//try sleeping again in case of slower comp
|
||||||
|
Thread.sleep(5000);
|
||||||
|
|
||||||
|
slaveQueryRsp = query("*:*", slaveClient);
|
||||||
|
slaveQueryResult = (SolrDocumentList) slaveQueryRsp.get("response");
|
||||||
|
}
|
||||||
|
|
||||||
assertEquals(500, slaveQueryResult.getNumFound());
|
assertEquals(500, slaveQueryResult.getNumFound());
|
||||||
|
|
||||||
//compare results
|
//compare results
|
||||||
|
|
Loading…
Reference in New Issue