mirror of https://github.com/apache/lucene.git
SOLR-4019: Fix tests that are invalid due to logging change
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1405919 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5fb2789394
commit
f1a67f7cb0
|
@ -84,19 +84,16 @@ public class PingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
assertEquals("OK", rsp.getValues().get("status"));
|
||||
|
||||
}
|
||||
@Ignore
|
||||
public void testEnablingServer() throws Exception {
|
||||
|
||||
assertTrue(! healthcheckFile.exists());
|
||||
|
||||
// first make sure that ping responds back that the service is disabled
|
||||
|
||||
try {
|
||||
makeRequest(handler, req());
|
||||
fail("Should have thrown a SolrException because not enabled yet");
|
||||
} catch (SolrException se){
|
||||
assertEquals(SolrException.ErrorCode.SERVICE_UNAVAILABLE.code,se.code());
|
||||
}
|
||||
SolrQueryResponse sqr = makeRequest(handler, req());
|
||||
SolrException se = (SolrException) sqr.getException();
|
||||
assertEquals(
|
||||
"Response should have been replaced with a 503 SolrException.",
|
||||
se.code(), SolrException.ErrorCode.SERVICE_UNAVAILABLE.code);
|
||||
|
||||
// now enable
|
||||
|
||||
|
@ -115,7 +112,6 @@ public class PingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
assertTrue(healthcheckFile.exists());
|
||||
|
||||
}
|
||||
@Ignore
|
||||
public void testDisablingServer() throws Exception {
|
||||
|
||||
assertTrue(! healthcheckFile.exists());
|
||||
|
@ -134,13 +130,11 @@ public class PingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
assertFalse(healthcheckFile.exists());
|
||||
|
||||
// now make sure that ping responds back that the service is disabled
|
||||
|
||||
try {
|
||||
makeRequest(handler, req());
|
||||
fail("Should have thrown a SolrException because not enabled yet");
|
||||
} catch (SolrException se){
|
||||
assertEquals(SolrException.ErrorCode.SERVICE_UNAVAILABLE.code,se.code());
|
||||
}
|
||||
SolrQueryResponse sqr = makeRequest(handler, req());
|
||||
SolrException se = (SolrException) sqr.getException();
|
||||
assertEquals(
|
||||
"Response should have been replaced with a 503 SolrException.",
|
||||
se.code(), SolrException.ErrorCode.SERVICE_UNAVAILABLE.code);
|
||||
|
||||
// disable when already disabled shouldn't cause any problems
|
||||
makeRequest(handler, req("action", "disable"));
|
||||
|
|
Loading…
Reference in New Issue