You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2019/06/04 20:56:11 UTC
[lucene-solr] branch branch_8x updated: Fix
TestSort.testRandomFieldNameSorts typo that ccaused very sporadic but
reproducible failures
This is an automated email from the ASF dual-hosted git repository.
hossman pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/branch_8x by this push:
new 63e9373 Fix TestSort.testRandomFieldNameSorts typo that ccaused very sporadic but reproducible failures
63e9373 is described below
commit 63e93735a698909401e49b64a2c76c60f7c7fa38
Author: Chris Hostetter <ho...@apache.org>
AuthorDate: Tue Jun 4 13:49:57 2019 -0700
Fix TestSort.testRandomFieldNameSorts typo that ccaused very sporadic but reproducible failures
(cherry picked from commit 92cf9d8758285352a6bd3a959988f9b72ecdf8f0)
---
solr/core/src/test/org/apache/solr/search/TestSort.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/solr/core/src/test/org/apache/solr/search/TestSort.java b/solr/core/src/test/org/apache/solr/search/TestSort.java
index 54cc5ea..bbb85d7 100644
--- a/solr/core/src/test/org/apache/solr/search/TestSort.java
+++ b/solr/core/src/test/org/apache/solr/search/TestSort.java
@@ -111,8 +111,8 @@ public class TestSort extends SolrTestCaseJ4 {
names[j] = TestUtil.randomRealisticUnicodeString(r, 1, 100);
// munge anything that might make this a function
- names[j] = names[j].replaceFirst("\\{","\\{\\{");
- names[j] = names[j].replaceFirst("\\(","\\(\\(");
+ names[j] = names[j].replaceFirst("\\{","\\}\\{");
+ names[j] = names[j].replaceFirst("\\(","\\)\\(");
names[j] = names[j].replaceFirst("(\\\"|\\')","$1$1z");
names[j] = names[j].replaceFirst("(\\d)","$1x");
@@ -162,7 +162,8 @@ public class TestSort extends SolrTestCaseJ4 {
assertEquals("sorts["+j+"] is (unexpectedly) type doc : " + input,
"_docid_", names[j]);
} else if (Type.CUSTOM.equals(type) || Type.REWRITEABLE.equals(type)) {
-
+ log.error("names[{}] : {}", j, names[j]);
+ log.error("sorts[{}] : {}", j, sorts[j]);
fail("sorts["+j+"] resulted in a '" + type.toString()
+ "', either sort parsing code is broken, or func/query "
+ "semantics have gotten broader and munging in this test "