[GitHub] nifi-minifi pull request #24: MINIFI-49 Made TestRestChangeNotifier upload f...

2016-07-04 Thread JPercivall
Github user JPercivall commented on a diff in the pull request:

https://github.com/apache/nifi-minifi/pull/24#discussion_r69504541
  
--- Diff: 
minifi-bootstrap/src/test/java/org/apache/nifi/minifi/bootstrap/configuration/notifiers/util/TestRestChangeNotifierCommon.java
 ---
@@ -84,6 +78,14 @@ public void testFileUpload() throws Exception {
 
 assertEquals("The result of notifying 
listeners:\nMockChangeListener successfully handled the configuration 
change\n", response.body().string());
 
-assertEquals(new String(Files.readAllBytes(file.toPath())), 
mockChangeListener.getConfFile());
+// Ignoring the system dependent line ending.
+String confFile = mockChangeListener.getConfFile();
+if (confFile.endsWith("\n") || confFile.endsWith("\r")) {
--- End diff --

You are totally right, will change


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi-minifi pull request #24: MINIFI-49 Made TestRestChangeNotifier upload f...

2016-07-04 Thread apiri
Github user apiri commented on a diff in the pull request:

https://github.com/apache/nifi-minifi/pull/24#discussion_r69502168
  
--- Diff: 
minifi-bootstrap/src/test/java/org/apache/nifi/minifi/bootstrap/configuration/notifiers/util/TestRestChangeNotifierCommon.java
 ---
@@ -84,6 +78,14 @@ public void testFileUpload() throws Exception {
 
 assertEquals("The result of notifying 
listeners:\nMockChangeListener successfully handled the configuration 
change\n", response.body().string());
 
-assertEquals(new String(Files.readAllBytes(file.toPath())), 
mockChangeListener.getConfFile());
+// Ignoring the system dependent line ending.
+String confFile = mockChangeListener.getConfFile();
+if (confFile.endsWith("\n") || confFile.endsWith("\r")) {
--- End diff --

Do you think it would be better to just use a StringUtils#trim on the 
returned conf file?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---