Apache Lucene open-source search software
SOLR-5168: test improvements and @Ignore still broken test
Chris M. Hostetter0337755ed84b
diff --git a/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java b/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.javaindex 18310b1554c..5972e093824 100644--- a/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java+++ b/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java@@ -25,6 +25,7 @@ import org.apache.solr.search.SolrCache;import org.apache.solr.search.SyntaxError;import org.junit.BeforeClass;import org.junit.Test;+import org.junit.Ignore;import java.io.IOException;import java.util.ArrayList;@@ -49,13 +50,21 @@ public class BJQParserTest extends SolrTestCaseJ4 {int i = 0;List<List<String[]>> blocks = createBlocks();for (List<String[]> block : blocks) {+ List<XmlDoc> updBlock = new ArrayList<>();+for (String[] doc : block) {String[] idDoc = Arrays.copyOf(doc,doc.length+2);idDoc[doc.length]="id";idDoc[doc.length+1]=Integer.toString(i);- assertU(add(doc(idDoc)));+ updBlock.add(doc(idDoc));i++;}+ //got xmls for every doc. now nest all into the last one+ XmlDoc parentDoc = updBlock.get(updBlock.size()-1);+ parentDoc.xml = parentDoc.xml.replace("</doc>",+ updBlock.subList(0, updBlock.size()-1).toString().replaceAll("[\\[\\]]","")+"</doc>");+ assertU(add(parentDoc));+if (random().nextBoolean()) {assertU(commit());// force empty segment (actually, this will no longer create an empty segment, only a new segments_n)@@ -184,6 +193,7 @@ public class BJQParserTest extends SolrTestCaseJ4 {}@Test+ @Ignore("SOLR-5168")public void testGrandChildren() throws IOException {assertQ(req("q", "{!parent which=$parentfilter v=$children}", "children",