mirror of https://github.com/apache/nifi.git
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
This commit is contained in:
parent
ed3452f527
commit
7f0eb2e352
|
@ -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'");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue