From c140f39ddc0d901e8557c5200cc9010651450682 Mon Sep 17 00:00:00 2001 From: Erik Hatcher Date: Tue, 13 Oct 2009 20:28:04 +0000 Subject: [PATCH] Added root flag to TestContext, otherwise it always is false. git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@824910 13f79535-47bb-0310-9956-ffa450edef68 --- .../dataimport/AbstractDataImportHandlerTest.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTest.java b/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTest.java index c9c1be48250..063fb111bb9 100644 --- a/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTest.java +++ b/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTest.java @@ -120,7 +120,7 @@ public abstract class AbstractDataImportHandlerTest extends final Context delegate = new ContextImpl(parentEntity, resolver, parentDataSource, currProcess, new HashMap(), null, null); - return new TestContext(entityAttrs, delegate, entityFields); + return new TestContext(entityAttrs, delegate, entityFields, parentEntity == null); } /** @@ -144,12 +144,15 @@ public abstract class AbstractDataImportHandlerTest extends private final Map entityAttrs; private final Context delegate; private final List> entityFields; + private final boolean root; String script,scriptlang; - public TestContext(Map entityAttrs, Context delegate, List> entityFields) { + public TestContext(Map entityAttrs, Context delegate, + List> entityFields, boolean root) { this.entityAttrs = entityAttrs; this.delegate = delegate; this.entityFields = entityFields; + this.root = root; } public String getEntityAttribute(String name) { @@ -175,7 +178,7 @@ public abstract class AbstractDataImportHandlerTest extends } public boolean isRootEntity() { - return false; + return root; } public String currentProcess() {