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
|
||||
@ShardsFixed(num = 2)
|
||||
public void test() throws Exception {
|
||||
public void searchingShouldFailWithoutTolerantSearchSetToTrue() throws Exception {
|
||||
waitForRecoveriesToFinish(true);
|
||||
|
||||
indexAbunchOfDocs();
|
||||
|
@ -56,12 +56,13 @@ public class TestDownShardTolerantSearch extends AbstractFullDistribZkTestBase {
|
|||
assertTrue(response.getResults().getNumFound() > 0);
|
||||
|
||||
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");
|
||||
} catch (SolrServerException e) {
|
||||
log.info("error from server", e);
|
||||
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) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue