Dale Emery created GEODE-9523:
---------------------------------

             Summary: ContainerInstall Resource path invalid on Windows
                 Key: GEODE-9523
                 URL: https://issues.apache.org/jira/browse/GEODE-9523
             Project: Geode
          Issue Type: Test
          Components: tests
            Reporter: Dale Emery


The {{ContainerInstall}} test helper creates an installer using this code:

{noformat}
String resource = getResource(getClass(), "/" + downloadURL).getPath();
URL url = Paths.get(resource).toUri().toURL();
Installer installer = new ZipURLInstaller(url, TMP_DIR + "/downloads", 
installDir);
{noformat}

On Windows, the {{resource}} string is not a valid {{Path}}, and the second 
line throws an exception:
_java.nio.file.InvalidPathException: Illegal char <:> at index 2: 
/C:/Users/geode/geode/geode-assembly/build/resources/distributedTest/tomcat-9.0.48.zip_

The chain of conversions is unnecessary. On Windows, the URL returned from 
{{getResource(...)}} is a perfectly fine URL to pass to the {{ZipURLInstaller}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to