mirror of https://github.com/apache/lucene.git
SOLR-7566: Code cosmetics
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1685179 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1904ce1d19
commit
eea1657790
|
@ -40,7 +40,7 @@ public class TestDownShardTolerantSearch extends AbstractFullDistribZkTestBase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ShardsFixed(num = 2)
|
@ShardsFixed(num = 2)
|
||||||
public void test() throws Exception {
|
public void searchingShouldFailWithoutTolerantSearchSetToTrue() throws Exception {
|
||||||
waitForRecoveriesToFinish(true);
|
waitForRecoveriesToFinish(true);
|
||||||
|
|
||||||
indexAbunchOfDocs();
|
indexAbunchOfDocs();
|
||||||
|
@ -56,12 +56,13 @@ public class TestDownShardTolerantSearch extends AbstractFullDistribZkTestBase {
|
||||||
assertTrue(response.getResults().getNumFound() > 0);
|
assertTrue(response.getResults().getNumFound() > 0);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
response = cloudClient.query(new SolrQuery("*:*").setRows(1).setParam(ShardParams.SHARDS_TOLERANT, false));
|
cloudClient.query(new SolrQuery("*:*").setRows(1).setParam(ShardParams.SHARDS_TOLERANT, false));
|
||||||
fail("Request should have failed because we killed shard1 jetty");
|
fail("Request should have failed because we killed shard1 jetty");
|
||||||
} catch (SolrServerException e) {
|
} catch (SolrServerException e) {
|
||||||
log.info("error from server", e);
|
log.info("error from server", e);
|
||||||
assertNotNull(e.getCause());
|
assertNotNull(e.getCause());
|
||||||
assertTrue("Error message from server should have the name of the down shard", e.getCause().getMessage().contains("shard1"));
|
assertTrue("Error message from server should have the name of the down shard",
|
||||||
|
e.getCause().getMessage().contains(SHARD1));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue