You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mu...@apache.org on 2019/08/05 03:57:55 UTC
[lucene-solr] branch master updated: SOLR-13676: Reduce log
verbosity in TestDistributedGrouping (#819)
This is an automated email from the ASF dual-hosted git repository.
munendrasn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/master by this push:
new 751e646 SOLR-13676: Reduce log verbosity in TestDistributedGrouping (#819)
751e646 is described below
commit 751e64651cd612a78842bf652bf9a3b77322fc40
Author: Diego <di...@gmail.com>
AuthorDate: Mon Aug 5 04:57:44 2019 +0100
SOLR-13676: Reduce log verbosity in TestDistributedGrouping (#819)
* SOLR-13676: Reduce log verbosity in TestDistributedGrouping using ignoreException
* Code review
* Remove Assert
---
solr/core/src/test/org/apache/solr/TestDistributedGrouping.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/solr/core/src/test/org/apache/solr/TestDistributedGrouping.java b/solr/core/src/test/org/apache/solr/TestDistributedGrouping.java
index 73315f5..f35eb5a 100644
--- a/solr/core/src/test/org/apache/solr/TestDistributedGrouping.java
+++ b/solr/core/src/test/org/apache/solr/TestDistributedGrouping.java
@@ -31,6 +31,8 @@ import org.apache.solr.common.util.NamedList;
import org.apache.solr.SolrTestCaseJ4.SuppressPointFields;
import org.junit.Test;
+import static org.hamcrest.CoreMatchers.containsString;
+
/**
* TODO? perhaps use:
* http://docs.codehaus.org/display/JETTY/ServletTester
@@ -221,12 +223,14 @@ public class TestDistributedGrouping extends BaseDistributedSearchTestCase {
"fl", "id", "group.format", "grouped", "group.limit", "-12",
"sort", i1 + " asc, id asc");
+ ignoreException("'group.offset' parameter cannot be negative");
SolrException exception = expectThrows(SolrException.class, () -> query("q", "*:*",
"group", "true",
"group.query", t1 + ":kings OR " + t1 + ":eggs", "group.offset", "-1")
);
assertEquals(SolrException.ErrorCode.BAD_REQUEST.code, exception.code());
- assertTrue(exception.getMessage().contains("'group.offset' parameter cannot be negative"));
+ assertThat(exception.getMessage(), containsString("'group.offset' parameter cannot be negative"));
+ resetExceptionIgnores();
query("q", "*:*",
"group", "true",