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 246374

Summary: Classes in Test Package not compiling when referring to classes of other project's Test Package
Product: java Reporter: ulfzibis <ulfzibis>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: PC   
OS: Linux   
See Also: https://netbeans.org/bugzilla/show_bug.cgi?id=254172
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 246438, 246950    
Attachments: 3 test projects

Description ulfzibis 2014-08-11 00:49:44 UTC
[ JDK VERSION : 1.7.0_45 ]

STEPS:
   1) In project B have classes in Test Packages, depending on classes in
project A Test Packages.
   2) In Test Libraries of project B add reference to build/test/classes/ of
project A

ACTUAL:
   Error: cannot find symbol of ...
   But: Run File processes normal.

EXPECTED:
   Classes should compile and run normally, even when I set the reference to
test/ of project A.
Comment 1 ulfzibis 2014-08-13 14:00:07 UTC
Correction: [ JDK VERSION : 1.7.0_55 ]
Comment 2 Jiri Prox 2014-08-14 11:01:22 UTC
Can you please share the project? 
I've tried to setup two projects according to your description but it works fine for me.
Comment 3 ulfzibis 2014-08-14 15:19:09 UTC
Created attachment 148707 [details]
3 test projects

The problematic file is:
KVB/KomPrüfStand/test/de/DMS/KVB/KomPruefStand/TestRahmen.java
Comment 4 ulfzibis 2014-08-14 15:47:13 UTC
BTW: Which of the 2 possibilities would you value as "correct" to configure a reference to Test Packages of project A in Test Packages of project B?
IMO, the most interesting solution would be just to set a reference to project A in Test Packages of project B, but this didn't work.
Comment 5 Tomas Zezula 2015-03-04 11:08:19 UTC
Fixed jet-main 0901f6d2f827
Comment 6 ulfzibis 2015-04-17 13:56:27 UTC
Hi,

is it possible to have this as a hotfix for NB 8.0.2 ?
Comment 7 ulfzibis 2015-08-06 12:55:44 UTC
Verified with Build 201508011000.
Works fine with
   file.reference.test-classes=${project.A}/test
but not
   file.reference.test-classes=${project.A}/build/test/classes
because after Clean&Build I get a reference conflict as /build/test/classes becomes deleted.