Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 158317

Summary: JUnit execution fails if the source is generated into the default package.
Product: z_Archived Reporter: Joe Toomey <jptoomey>
Component: TPTPAssignee: Nédélec Patrick <nedelec>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P1 CC: paulslau
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Fix none

Description Joe Toomey CLA 2006-09-22 10:51:52 EDT
If you create a JUnit test and configure it to generate source to the default package, the test will not run.  The following error appears in the execution history.  It appears to be assuming that the test class will not be in the default package.

java.lang.ClassNotFoundException: .JUnit3
	at java.lang.Class.forName(Class.java:160)
	at org.eclipse.hyades.test.java.runner.HyadesJUnitRunner.main(HyadesJUnitRunner.java:188)
Comment 1 Julien Canches CLA 2006-10-18 04:17:39 EDT
Adjusting priority to reflect severity.
Comment 2 Paul Slauenwhite CLA 2006-10-20 14:53:04 EDT
Please target to 4.4 since all non-blocking/critical defects will be deferred as decided in today's AG call.
Comment 3 Paul Slauenwhite CLA 2007-01-16 10:26:06 EST
Reassigning to the component leads to triage for 4.4.
Comment 4 Nédélec Patrick CLA 2007-02-08 12:19:18 EST
Fixed.
A Helper codegen class was modifying the model with a badly computed name ".<CLASS_UNDER_TEST_NAME>".
The fix is to avoid the prefix "." if the package name is empty ie if the default package is used.
Comment 5 Nédélec Patrick CLA 2007-02-09 04:50:56 EST
Roll back to previous version of source code because of the test pass timeframe.
Target updated to 4.4i2
Comment 6 Nédélec Patrick CLA 2007-02-09 04:52:26 EST
Created attachment 58639 [details]
Fix
Comment 7 Nédélec Patrick CLA 2007-02-27 07:18:34 EST
Patch applied.
Comment 8 Nédélec Patrick CLA 2007-03-23 09:15:46 EDT
Updating hours worked
Comment 9 Paul Slauenwhite CLA 2007-06-02 14:51:40 EDT
Reporter: Please verify and close in preparation for shutting down the TPTP 4.4 release.  Thanks.
Comment 10 Joe Toomey CLA 2007-07-10 15:52:39 EDT
Verified in 4.4.  Closing.