[JIRA] (JENKINS-36163) Spaces in Job Name Cause Maven Test Failures for File Input

16 views
Skip to first unread message

signusx7@gmail.com (JIRA)

unread,
Jun 22, 2016, 7:36:03 PM6/22/16
to jenkinsc...@googlegroups.com
Matthew Sexton created an issue
 
Jenkins / Bug JENKINS-36163
Spaces in Job Name Cause Maven Test Failures for File Input
Issue Type: Bug Bug
Assignee: Unassigned
Components: maven-plugin
Created: 2016/Jun/22 11:35 PM
Environment: Jenkins 2.10, CentOS 7 x64, OpenJDK 1.8
Priority: Minor Minor
Reporter: Matthew Sexton

Issue set as minor due to available workaround.

Problem:

Where maven job names have spaces and files are used within the workspace, Jenkins cannot locate the file in the workspace because the url-encoded values do not match the literal value of the path on the host.

Job name: "KEY (3) - Package email (DEV)"

java.nio.file.NoSuchFileException: /var/lib/jenkins/jobs/foldername/jobs/KEY%20(3)%20-%20Package%20email%20(DEV)/workspace/email/target/test-classes/data/TextEmail.txt
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
    at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
    at java.nio.file.Files.newByteChannel(Files.java:317)
    at java.nio.file.Files.newByteChannel(Files.java:363)
    at java.nio.file.Files.readAllBytes(Files.java:2981)
    at com.company.a.e.ParserTest.setUp(ParserTest.java:50)

Where the file is validated and the literal path is /var/lib/jenkins/jobs/foldername/jobs/KEY (3) - Package email (DEV)/workspace/email/target/test-classes/data/TextEmail.txt

Workaround:

Change the job name to "KEY3PackageEmailDEV" removing all spaces allows the tests to locate the appropriate filepaths correctly - and the tests can be run without errors.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

signusx7@gmail.com (JIRA)

unread,
Jun 22, 2016, 7:38:01 PM6/22/16
to jenkinsc...@googlegroups.com
Matthew Sexton updated an issue
Change By: Matthew Sexton
Issue set as minor due to available workaround.

*Problem:*


Where maven job names have spaces and files are used within the workspace, Jenkins cannot locate the file in the workspace because the url-encoded values do not match the literal value of the path on the host.

Job name: "KEY (3) - Package email app (DEV)"

{code}
java.nio.file.NoSuchFileException: /var/lib/jenkins/jobs/foldername/jobs/KEY%20(3)%20-%20Package%
20email 20app %20(DEV)/workspace/email/target/test-classes/data/ TextEmail TestText .txt

    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
    at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
    at java.nio.file.Files.newByteChannel(Files.java:317)
    at java.nio.file.Files.newByteChannel(Files.java:363)
    at java.nio.file.Files.readAllBytes(Files.java:2981)
    at com.company.a.e.ParserTest.setUp(ParserTest.java:50)
{code}

Where the file is validated and the literal path is /var/lib/jenkins/jobs/foldername/jobs/KEY (3) - Package
email app (DEV)/workspace/email/target/test-classes/data/ TextEmail TextTest .txt

*Workaround:*

Change the job name to "
KEY3PackageEmailDEV KEY3PackageAppDEV " removing all spaces allows the tests to locate the appropriate filepaths correctly - and the tests can be run without errors.
Reply all
Reply to author
Forward
0 new messages