SOLR-2673: fix test dependent on order

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1150404 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2011-07-24 15:19:49 +00:00
parent 347ba7a172
commit 870a4ce9f9
1 changed files with 19 additions and 16 deletions

View File

@ -180,8 +180,18 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
return details; return details;
} }
@Test public void test() throws Exception {
public void testDetails() throws Exception { doTestDetails();
doTestReplicateAfterWrite2Slave();
doTestIndexAndConfigReplication();
doTestStopPoll();
doTestSnapPullWithMasterUrl();
doTestReplicateAfterStartup();
doTestIndexAndConfigAliasReplication();
doTestBackup();
}
private void doTestDetails() throws Exception {
{ {
NamedList<Object> details = getDetails(masterClient); NamedList<Object> details = getDetails(masterClient);
@ -234,8 +244,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
} }
} }
@Test private void doTestReplicateAfterWrite2Slave() throws Exception {
public void testReplicateAfterWrite2Slave() throws Exception {
clearIndexWithReplication(); clearIndexWithReplication();
nDocs--; nDocs--;
for (int i = 0; i < nDocs; i++) { for (int i = 0; i < nDocs; i++) {
@ -299,8 +308,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
assertEquals(nDocs, slaveQueryResult.getNumFound()); assertEquals(nDocs, slaveQueryResult.getNumFound());
} }
@Test private void doTestIndexAndConfigReplication() throws Exception {
public void testIndexAndConfigReplication() throws Exception {
clearIndexWithReplication(); clearIndexWithReplication();
nDocs--; nDocs--;
@ -355,8 +363,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
} }
@Test private void doTestStopPoll() throws Exception {
public void testStopPoll() throws Exception {
clearIndexWithReplication(); clearIndexWithReplication();
// Test: // Test:
@ -423,8 +430,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
} }
@Test private void doTestSnapPullWithMasterUrl() throws Exception {
public void testSnapPullWithMasterUrl() throws Exception {
//change solrconfig on slave //change solrconfig on slave
//this has no entry for pollinginterval //this has no entry for pollinginterval
slave.copyConfigFile(CONF_DIR + "solrconfig-slave1.xml", "solrconfig.xml"); slave.copyConfigFile(CONF_DIR + "solrconfig-slave1.xml", "solrconfig.xml");
@ -471,8 +477,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
} }
@Test private void doTestReplicateAfterStartup() throws Exception {
public void testReplicateAfterStartup() throws Exception {
//stop slave //stop slave
slaveJetty.stop(); slaveJetty.stop();
@ -529,8 +534,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
} }
@Test private void doTestIndexAndConfigAliasReplication() throws Exception {
public void testIndexAndConfigAliasReplication() throws Exception {
clearIndexWithReplication(); clearIndexWithReplication();
nDocs--; nDocs--;
@ -604,8 +608,7 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
@Test private void doTestBackup() throws Exception {
public void testBackup() throws Exception {
masterJetty.stop(); masterJetty.stop();
master.copyConfigFile(CONF_DIR + "solrconfig-master1.xml", master.copyConfigFile(CONF_DIR + "solrconfig-master1.xml",
"solrconfig.xml"); "solrconfig.xml");