You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by jo...@apache.org on 2014/12/23 22:06:13 UTC
[3/3] incubator-nifi git commit: NIFI-51 made a test a little nicer
about cleanup as it kept messing up the build and addressed the possible
NPE/ordering logic for 51
NIFI-51 made a test a little nicer about cleanup as it kept messing up the build and addressed the possible NPE/ordering logic for 51
Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/7f0eb2e3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/7f0eb2e3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/7f0eb2e3
Branch: refs/heads/develop
Commit: 7f0eb2e35286b58a1072067599a88ca47af991a8
Parents: ed3452f
Author: joewitt <jo...@apache.org>
Authored: Tue Dec 23 16:05:43 2014 -0500
Committer: joewitt <jo...@apache.org>
Committed: Tue Dec 23 16:05:43 2014 -0500
----------------------------------------------------------------------
.../java/org/apache/nifi/util/NiFiProperties.java | 14 ++++++--------
.../flow/impl/DataFlowManagementServiceImplTest.java | 6 ++++--
2 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/7f0eb2e3/commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
----------------------------------------------------------------------
diff --git a/commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java b/commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
index 1520814..6fdc4c1 100644
--- a/commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
+++ b/commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
@@ -374,20 +374,18 @@ public class NiFiProperties extends Properties {
return getPropertyAsPort(REMOTE_INPUT_PORT, DEFAULT_REMOTE_INPUT_PORT);
}
+ /**
+ * @return False if property value is 'false'; True otherwise.
+ */
public Boolean isSiteToSiteSecure() {
- final String secureVal = getProperty(SITE_TO_SITE_SECURE);
- if (secureVal == null) {
- return null;
- }
+ final String secureVal = getProperty(SITE_TO_SITE_SECURE, "true");
- if ("true".equalsIgnoreCase(secureVal)) {
- return true;
- }
if ("false".equalsIgnoreCase(secureVal)) {
return false;
+ }else{
+ return true;
}
- throw new IllegalStateException("Property value for " + SITE_TO_SITE_SECURE + " is " + secureVal + "; expected 'true' or 'false'");
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/7f0eb2e3/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/flow/impl/DataFlowManagementServiceImplTest.java
----------------------------------------------------------------------
diff --git a/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/flow/impl/DataFlowManagementServiceImplTest.java b/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/flow/impl/DataFlowManagementServiceImplTest.java
index 6294dfc..f9ba016 100644
--- a/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/flow/impl/DataFlowManagementServiceImplTest.java
+++ b/nar-bundles/framework-bundle/framework/cluster/src/test/java/org/apache/nifi/cluster/flow/impl/DataFlowManagementServiceImplTest.java
@@ -74,8 +74,8 @@ public class DataFlowManagementServiceImplTest {
@Before
public void setup() throws IOException {
- primaryLocation = new File(System.getProperty("java.io.tmpdir") + "/primary");
- restoreLocation = new File(System.getProperty("java.io.tmpdir") + "/restore");
+ primaryLocation = new File(System.getProperty("java.io.tmpdir") + "/primary" + this.getClass().getSimpleName());
+ restoreLocation = new File(System.getProperty("java.io.tmpdir") + "/restore" + this.getClass().getSimpleName());
FileUtils.deleteDirectory(primaryLocation);
FileUtils.deleteDirectory(restoreLocation);
@@ -114,6 +114,8 @@ public class DataFlowManagementServiceImplTest {
ex.printStackTrace(System.out);
}
}
+ FileUtils.deleteDirectory(primaryLocation);
+ FileUtils.deleteDirectory(restoreLocation);
}