lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject svn commit: r824910 - /lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTest.java
Date Tue, 13 Oct 2009 20:28:05 GMT
Author: ehatcher
Date: Tue Oct 13 20:28:04 2009
New Revision: 824910

URL: http://svn.apache.org/viewvc?rev=824910&view=rev
Log:
Added root flag to TestContext, otherwise it always is false.

Modified:
    lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTest.java

Modified: lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTest.java?rev=824910&r1=824909&r2=824910&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTest.java
(original)
+++ lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTest.java
Tue Oct 13 20:28:04 2009
@@ -120,7 +120,7 @@
     final Context delegate = new ContextImpl(parentEntity, resolver,
             parentDataSource, currProcess,
             new HashMap<String, Object>(), null, null);
-    return new TestContext(entityAttrs, delegate, entityFields);
+    return new TestContext(entityAttrs, delegate, entityFields, parentEntity == null);
   }
 
   /**
@@ -144,12 +144,15 @@
     private final Map<String, String> entityAttrs;
     private final Context delegate;
     private final List<Map<String, String>> entityFields;
+    private final boolean root;
     String script,scriptlang;
 
-    public TestContext(Map<String, String> entityAttrs, Context delegate, List<Map<String,
String>> entityFields) {
+    public TestContext(Map<String, String> entityAttrs, Context delegate,
+                       List<Map<String, String>> 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 boolean isRootEntity() {
-      return false;
+      return root;
     }
 
     public String currentProcess() {



Mime
View raw message