This is an automated email from the ASF dual-hosted git repository.

mthomsen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/master by this push:
     new 376c344  NIFI-5574 Removed usage of Paths.get() due to TEST_RES_PATH 
being resolved to a string from a URI, which results in platform-specific path 
information (C:\) when tests are run on Windows.
376c344 is described below

commit 376c344edbbeb578ecd450a48a7c9241d7dd4aeb
Author: Jeff Storck <[email protected]>
AuthorDate: Tue Sep 4 17:36:20 2018 -0400

    NIFI-5574 Removed usage of Paths.get() due to TEST_RES_PATH being resolved 
to a string from a URI, which results in platform-specific path information 
(C:\) when tests are run on Windows.
    
    This closes #2988
    
    Signed-off-by: Mike Thomsen <[email protected]>
---
 .../src/test/groovy/org/apache/nifi/NiFiGroovyTest.groovy             | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-runtime/src/test/groovy/org/apache/nifi/NiFiGroovyTest.groovy
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-runtime/src/test/groovy/org/apache/nifi/NiFiGroovyTest.groovy
index b421976..69dc5b0 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-runtime/src/test/groovy/org/apache/nifi/NiFiGroovyTest.groovy
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-runtime/src/test/groovy/org/apache/nifi/NiFiGroovyTest.groovy
@@ -138,7 +138,7 @@ class NiFiGroovyTest extends GroovyTestCase {
     @Test
     void testMainShouldHandleMalformedBootstrapKeyFromFile() throws Exception {
         // Arrange
-        def passwordFile = Paths.get(TEST_RES_PATH, "NiFiProperties", 
"password-testMainShouldHandleMalformedBootstrapKeyFromFile.txt").toFile()
+        def passwordFile = new 
File("${TEST_RES_PATH}/NiFiProperties/password-testMainShouldHandleMalformedBootstrapKeyFromFile.txt")
         passwordFile.text = "BAD KEY"
         def args = ["-K", passwordFile.absolutePath] as String[]
 
@@ -158,7 +158,7 @@ class NiFiGroovyTest extends GroovyTestCase {
 
         // 64 chars of '0' for a 256 bit key; 32 chars for 128 bit
         final String DIFFERENT_KEY = "0" * (currentMaxKeyLengthInBits / 4)
-        def passwordFile = Paths.get(TEST_RES_PATH, "NiFiProperties", 
"password-testInitializePropertiesShouldSetBootstrapKeyFromFile.txt").toFile()
+        def passwordFile = new 
File("${TEST_RES_PATH}/NiFiProperties/password-testInitializePropertiesShouldSetBootstrapKeyFromFile.txt")
         passwordFile.text = DIFFERENT_KEY
         def args = ["-K", passwordFile.absolutePath] as String[]
 

Reply via email to