This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 72806

Summary: Cannot influence runtime path of unit tests
Product: apisupport Reporter: Jaroslav Tulach <jtulach>
Component: HarnessAssignee: Jesse Glick <jglick>
Status: VERIFIED DUPLICATE    
Severity: blocker CC: jskrivanek
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 54161    
Bug Blocks:    

Description Jaroslav Tulach 2006-02-19 07:39:00 UTC
I have a module in a suite which is needs filesystems on classpath to run unit 
tests. I tried to add dependency on filesystems, but just the one for runtime. 
To my surprise the module did not get included in the runtime classpath of 
junit tests. I needed to say that I want to use the dependency during compile 
time as well. 
 
The classpath of junit should be composed from runtime classpath of the 
project, at minimum.
Comment 1 Jesse Glick 2006-02-19 14:06:28 UTC
To add to the test classpath you should append to ${test.unit.run.cp.extra}, not
add module deps. See issue #54161 for more thoughts.

*** This issue has been marked as a duplicate of 54161 ***
Comment 2 Jaroslav Tulach 2006-02-25 14:18:48 UTC
"The classpath of junit should be composed from runtime classpath of the  
project, at minimum."  
 
The reason I said "at minimum" is that we can wait for ages till issue 54161 
is implemented, but we do not need to - it is enough to base the unit 
classpath on the compilation path, which imho should be pretty easy to fix. 
 
Comment 3 Jesse Glick 2006-02-27 03:05:02 UTC
May be easy or not (haven't checked yet), but in any rate wouldn't have helped
you in this case; you should not have been adding a module dep at all for
something that was only needed by unit tests.
Comment 4 Jaroslav Tulach 2006-02-27 07:54:31 UTC
I want to understand why runtime of junit tests is not using runtime module  
dependencies. Until this gets trustfully explained, I have to consider the  
behaviour to be a bug.  
Comment 5 Jesse Glick 2006-02-27 16:22:54 UTC
By design currently.
Comment 6 Jesse Glick 2006-07-20 05:46:25 UTC

*** This issue has been marked as a duplicate of 54161 ***
Comment 7 Tomas Danek 2006-10-10 14:49:31 UTC
verified duplicate.