You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by md...@apache.org on 2022/08/02 20:00:02 UTC

[solr] branch main updated: SOLR-16304 fix test failure

This is an automated email from the ASF dual-hosted git repository.

mdrob pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new f69d3d77a89 SOLR-16304 fix test failure
f69d3d77a89 is described below

commit f69d3d77a89d9cdffa301882d16021e4214dc165
Author: Mike Drob <md...@apache.org>
AuthorDate: Tue Aug 2 14:54:24 2022 -0500

    SOLR-16304 fix test failure
---
 solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java
index 6e61334ad79..ece21dea4a9 100644
--- a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java
+++ b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java
@@ -122,7 +122,8 @@ public class TestJsonFacets extends SolrTestCaseHS {
 
       // can't use LuceneTestCase.random() because we're not in the runner context yet
       String seed = System.getProperty("tests.seed", "");
-      return Collections.singleton(new Object[] {methods[seed.hashCode() % methods.length]});
+      return Collections.singleton(
+          new Object[] {methods[Math.abs(seed.hashCode()) % methods.length]});
     }
   }