nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marka...@apache.org
Subject incubator-nifi git commit: NIFI-389: Fixed bug that caused services that depend on other services to not be locatable in mock framework
Date Sun, 01 Mar 2015 20:33:16 GMT
Repository: incubator-nifi
Updated Branches:
  refs/heads/develop 83b33c805 -> 96a42cd72


NIFI-389: Fixed bug that caused services that depend on other services to not be locatable
in mock framework


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/96a42cd7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/96a42cd7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/96a42cd7

Branch: refs/heads/develop
Commit: 96a42cd72b0f009377080d471c420e14d23eca89
Parents: 83b33c8
Author: Mark Payne <markap14@hotmail.com>
Authored: Sun Mar 1 15:30:42 2015 -0500
Committer: Mark Payne <markap14@hotmail.com>
Committed: Sun Mar 1 15:30:42 2015 -0500

----------------------------------------------------------------------
 .../java/org/apache/nifi/util/MockControllerServiceLookup.java   | 3 +++
 .../src/main/java/org/apache/nifi/util/MockProcessContext.java   | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/96a42cd7/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockControllerServiceLookup.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockControllerServiceLookup.java
b/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockControllerServiceLookup.java
index f5a716c..8298a39 100644
--- a/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockControllerServiceLookup.java
+++ b/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockControllerServiceLookup.java
@@ -47,6 +47,9 @@ public abstract class MockControllerServiceLookup implements ControllerServiceLo
         controllerServiceMap.remove(service.getIdentifier());
     }
 
+    protected void addControllerServices(final MockControllerServiceLookup other) {
+        this.controllerServiceMap.putAll(other.controllerServiceMap);
+    }
     
     protected ControllerServiceConfiguration getConfiguration(final String identifier) {
         return controllerServiceMap.get(identifier);

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/96a42cd7/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockProcessContext.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockProcessContext.java b/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockProcessContext.java
index f83301c..6536928 100644
--- a/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockProcessContext.java
+++ b/nifi/nifi-mock/src/main/java/org/apache/nifi/util/MockProcessContext.java
@@ -67,11 +67,13 @@ public class MockProcessContext extends MockControllerServiceLookup implements
S
             annotationData = context.getControllerServiceAnnotationData(component);
             final Map<PropertyDescriptor, String> props = context.getControllerServiceProperties(component);
             properties.putAll(props);
+
+            super.addControllerServices(context);
         } catch (IllegalArgumentException e) {
             // do nothing...the service is being loaded
         }
     }
-
+    
     @Override
     public PropertyValue getProperty(final PropertyDescriptor descriptor) {
         return getProperty(descriptor.getName());


Mime
View raw message