SOLR-4471: Fix up test.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1449258 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2013-02-23 00:32:12 +00:00
parent 2d0dfe1519
commit 3adabbd43a
1 changed files with 22 additions and 4 deletions

View File

@ -447,7 +447,12 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
assertTrue(slaveXsltDir.isDirectory());
assertTrue(slaveXsl.exists());
// revert the schema
master.copyConfigFile(CONF_DIR + "schema-replication1.xml", "schema.xml");
masterJetty.stop();
masterJetty = createJetty(master);
masterClient = createNewSolrServer(masterJetty.getLocalPort());
}
@Test
@ -674,8 +679,8 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
}
}
private void doTestReplicateAfterStartup() throws Exception {
@Test
public void doTestReplicateAfterStartup() throws Exception {
//stop slave
slaveJetty.stop();
@ -737,7 +742,8 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
slaveClient = createNewSolrServer(slaveJetty.getLocalPort());
}
private void doTestReplicateAfterStartupWithNoActivity() throws Exception {
@Test
public void doTestReplicateAfterStartupWithNoActivity() throws Exception {
useFactory(null);
try {
@ -961,6 +967,18 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
slaveQueryRsp = rQuery(1, "*:*", slaveClient);
SolrDocument d = ((SolrDocumentList) slaveQueryRsp.get("response")).get(0);
assertEquals("newname = 2001", (String) d.getFieldValue("newname"));
// revert configs
//change solrconfig on master
master.copyConfigFile(CONF_DIR + "solrconfig-master1.xml",
"solrconfig.xml");
//change schema on master
master.copyConfigFile(CONF_DIR + "schema-replication1.xml",
"schema.xml");
masterJetty.stop();
masterJetty = createJetty(master);
masterClient = createNewSolrServer(masterJetty.getLocalPort());
}