diff --git a/solr/core/src/test/org/apache/solr/TestDistributedGrouping.java b/solr/core/src/test/org/apache/solr/TestDistributedGrouping.java index 73315f5b78d..f35eb5a0b10 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",