Bug 549914 - Running Junit 5 with a long classpath that has whitespace in it
Summary: Running Junit 5 with a long classpath that has whitespace in it
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.11   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-09 03:55 EDT by Loc Pham CLA
Modified: 2023-07-24 02:03 EDT (History)
1 user (show)

See Also:


Attachments
argument file (32.54 KB, text/plain)
2019-08-09 03:55 EDT, Loc Pham CLA
no flags Details
show command line button (148.51 KB, image/jpeg)
2019-08-09 03:55 EDT, Loc Pham CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Loc Pham CLA 2019-08-09 03:55:27 EDT
Created attachment 279532 [details]
argument file

I'm using Junit 5 version 5.3.2 on Spring Tools Suite (STS) version 4.2.0 on Windows 10. I have my STS installed on a folder on my c drive called 'spring tools'.

When running a Junit test within a project with a short enough classpath that an argument file (@-file) is not generated, my tests run fine. I believe this is because the classpath is enclosed in double quotes.

But on a project that has a long enough classpath that an @-file is generated when running a JUnit test, I get a 'No tests found with test runner 'JUnit 5' and a message in the console saying

"Error: Could not find or load main class tools\sts-4.2.0.RELEASE\configuration\org.eclipse.osgi\233\0.cp;C:\spring
Caused by: java.lang.ClassNotFoundException: tools\sts-4/2/0/RELEASE\configuration\org/eclipse/osgi\233\0/cp;C:\spring"

The issue is that when I look into the @-file that is generated, the file does not generate with the classpath enclosed in double quotes so when the Picocli parser reads the classpath it falls over when encountering the white space in 'spring tools'.

I've attached an example @-file and a screenshot of the 'Show Command Line' button.
Comment 1 Loc Pham CLA 2019-08-09 03:55:56 EDT
Created attachment 279533 [details]
show command line button
Comment 2 Sarika Sinha CLA 2019-08-12 01:13:31 EDT
Somewhat related bug in Ant: Bug 470390
Comment 3 Eclipse Genie CLA 2021-08-02 10:27:44 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 4 Eclipse Genie CLA 2021-08-02 10:27:50 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Eclipse Genie CLA 2021-08-02 12:16:07 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 6 Eclipse Genie CLA 2021-08-02 12:16:13 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 7 Eclipse Genie CLA 2023-07-24 02:03:50 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.