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 50891 - error in NBInstaller tests
Summary: error in NBInstaller tests
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: TEST
Depends on:
Blocks:
 
Reported: 2004-10-27 10:33 UTC by pzajac
Modified: 2008-12-22 19:39 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
test log 1 (14.50 KB, text/html)
2004-10-27 10:34 UTC, pzajac
Details
test log 2 (6.32 KB, text/plain)
2004-10-27 10:34 UTC, pzajac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pzajac 2004-10-27 10:33:32 UTC
[200410261800]
testLocalizedManifestAttributes:

      java.util.zip.ZipException: The system
cannot find the file specified
	at java.util.zip.ZipFile.open(Native Method)
	at java.util.zip.ZipFile.<init>(ZipFile.java:204)
	at java.util.jar.JarFile.<init>(JarFile.java:132)
	at java.util.jar.JarFile.<init>(JarFile.java:112)
	at
org.netbeans.core.modules.ModuleInstaller.loadManifest(ModuleInstaller.java:138)
	at
org.netbeans.core.modules.ModuleManager.loadManifest(ModuleManager.java:574)
	at
org.netbeans.core.modules.Module.loadManifest(Module.java:576)
	at
org.netbeans.core.modules.Module.<init>(Module.java:155)
	at
org.netbeans.core.modules.ModuleManager.create(ModuleManager.java:463)
	at
org.netbeans.core.modules.ModuleManagerTest.testLocalizedManifestAttributes(ModuleManagerTest.java:627)
	at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
junit.framework.TestCase.runTest(TestCase.java:154)
Comment 1 pzajac 2004-10-27 10:34:29 UTC
Created attachment 18551 [details]
test log 1
Comment 2 pzajac 2004-10-27 10:34:59 UTC
Created attachment 18552 [details]
test log 2
Comment 3 Jesse Glick 2004-10-27 12:42:45 UTC
First I've heard of such failures. What platforms does this actually
fail on? What tester machines? What configs? (Marked "PC"/"All" which
does not make much sense.)

Module.loadManifest under such a condition is supposed to annotate the
exception with the JAR path, using ErrorManager. What happened to this
information in XTest?
Comment 4 pzajac 2004-10-27 13:06:26 UTC
OS                 hostname          buildnumber jdk
----------------------------------------------------------
Windows 2000  	 QA-W2K-S3 200410261800  1.5.0
Windows XP 	qa-xp-s2 200410261800 	1.4.2_05 
SunOS 	qa-frodo 	200410261800 	1.5.0 	
SunOS 	qa-fiji 	200410261800 	1.5.0 	

The xtest registers his own ErrorManager. If is notified exception
with the ERROR priority the the tests fails. 
Comment 5 Jesse Glick 2004-10-27 22:21:03 UTC
But it seems that the XTest ErrorManager is not reporting the
annotation, which is the critical information here because it says
*what* ZIP file it could not open. Jirko, is annotate not implemented
in XTest? If so, this is a real problem for diagnosing test failures,
especially on a builder machine.
Comment 6 Jesse Glick 2004-10-27 22:22:09 UTC
Both tests pass for me on local disk...
Comment 7 Jesse Glick 2004-10-27 22:39:45 UTC
Looks like a QA infrastructure issue. I added an extra assert to
ModuleManagerTest and it fails on test4u:

testLocalizedManifestAttributes	fail	test JAR exists:
/space/test4u/testrun/work/sys/tests/unit/src/org/netbeans/core/modules/jars/localized-manifest.jar

Looks like the test machine is not building the tests correctly; this
and similar JARs are supposed to be created by the test build script
(as they are when run locally).
Comment 8 Jaroslav Tulach 2004-10-28 13:45:16 UTC
If it is infrastructure problem, then it should not be reported agaist
core. Reassigning away.
Comment 9 Jiri Skrivanek 2004-10-29 15:53:33 UTC
Yes, the test machine is not building the tests correctly but it is
not problem of infrastructure but of the build script. I think that on
machines where it failed is default locale 'cs'. And it builds only
localized-manifest_cs.jar and not localized-manifest.jar (look at
'Logs from builds scripts' link at test results page and search for
localized-manifest). 
Additionaly jars have to be built before buildTests task is called. If
not, it fails even from command line (do 'ant cleantests' before). To
fix this second issue just place buildTest task at the end in
unit-compiler target of build-unit.xml script.
Please, reassign to core, if my conclusions are right.
Comment 10 Jesse Glick 2004-10-29 16:12:44 UTC
Trying to figure out what is going on... looks like Ruda changed the
default of 'preservemodulejar' on <locjar> to true, an incompatible
change, without looking for existing users of this task (in particular
core/test/unit/src/org/netbeans/core/modules/build.xml)... so on my
machine (en_US) it is creating the localized JAR but not the plain one.

runtests *does* build JARs - just not this one, because of <locjar>
behavior I guess.
Comment 11 Jesse Glick 2004-10-29 16:18:53 UTC
Sorry, you're right about <buildTests>, it does need to be at the end,
apparently.

committed   * Up-To-Date  1.26        core/test/build-unit.xml
committed   * Up-To-Date  1.24       
core/test/unit/src/org/netbeans/core/modules/build.xml
Comment 12 pzajac 2004-11-02 17:52:43 UTC
v