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 65461 - Errors printed while running BuildZipDistributionTest
Summary: Errors printed while running BuildZipDistributionTest
Status: VERIFIED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: TEST
Depends on:
Blocks:
 
Reported: 2005-09-30 00:01 UTC by Jesse Glick
Modified: 2005-11-08 19:58 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Test output (XTest mode, clean dev build, JDK 1.4) (4.95 KB, text/plain)
2005-09-30 00:02 UTC, Jesse Glick
Details
Possible fix (2.60 KB, patch)
2005-10-01 07:04 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2005-09-30 00:01:18 UTC
Test claims to pass but prints out lengthy error messages. If they are expected,
should be suppressed from test's standard output.
Comment 1 Jesse Glick 2005-09-30 00:02:18 UTC
Created attachment 25338 [details]
Test output (XTest mode, clean dev build, JDK 1.4)
Comment 2 Jaroslav Tulach 2005-09-30 07:08:02 UTC
I was affraid that this test is also randomly failing as in issue 64940. But  
printing something to console is not that bad. Actually I do not even think it  
is bug. There is a lot of tests around that print some warnings and nobody is  
going to fix them.  
  
I am at least lowering priority. 
  
  
Comment 3 Martin Krauskopf 2005-09-30 09:14:54 UTC
> I was affraid that this test is also randomly failing as in issue 64940.

Happened to me. But after a fresh checkout I wasn't able to reproduce so far.
But off-topic for this issue. I'll fill a new one if it happens again.
Comment 4 Jesse Glick 2005-09-30 20:09:29 UTC
None of the other apisupport tests print more than one line of garbage. It is
quite distracting when you are looking at test output.
Comment 5 Jaroslav Tulach 2005-10-01 06:46:41 UTC
NbEvents.java:127 use System.err and that is the place responsible for most of  
the printed error. Can ErrorManager be used there instead?  
Comment 6 Jaroslav Tulach 2005-10-01 07:04:20 UTC
Created attachment 25387 [details]
Possible fix
Comment 7 Jesse Glick 2005-10-03 23:15:19 UTC
Possible but possibly undesirable as it would add prefixes like
[org.netbeans.core.modules] or whatever to the output.

Can't we just trap all I/O from the Ant subprocess? And send it to some logfile
in case anyone is interested?
Comment 8 Jaroslav Tulach 2005-10-04 08:13:08 UTC
The output from ant is already sent to log file. However module system is not   
ant subprocess...   
  
Re. prefixes: Can we patch NbErrorManager to not print prefixes when log(USER, 
msg) is used? 
Comment 9 Jesse Glick 2005-10-04 17:32:21 UTC
"module system is not Ant subprocess..." - you're running the app from Ant. I
think the problem is that the standard I/O redirection which the Ant module does
is reliant on the execution engine impl in core. Try calling System.setOut/Err
in the test (with a finally block, so you don't interrupt the normal display of
the test results).

"can we patch NbErrorManager to not print prefixes when log(USER, msg) is used?"
- yes, I suppose that would be simple enough, if fixing the test proves
impossible. (Or may be fine even if the test doesn't need it.)
Comment 10 Jesse Glick 2005-11-06 22:30:33 UTC
Real problem was that core's MainLookup was being asked to load ModuleInfo's,
and so initializing whole module system - totally unnecessary. When you just
suppress MainLookup, test run faster and quieter.
Comment 11 Jesse Glick 2005-11-06 23:10:32 UTC
Fixed as part of issue #65006.
Comment 12 Jaroslav Tulach 2005-11-08 12:35:26 UTC
Loading all modules is not necessary if you managed to convince the rest of 
the infrastructure to work without it. 
Comment 13 Jesse Glick 2005-11-08 19:58:43 UTC
Right. Basically, MainLookup was the default Lookup just because core.jar was in
the classpath - desirable for other reasons (like ArchiveURLMapper) but the
Lookup was unwanted. I wonder if ArchiveURLMapper shouldn't be moved to
openide/fs or openide/masterfs; would remove the need to have core.jar in CP of
many tests, I think. Generally it's a bit messy because there is just one test
CP for a whole module, whereas a given test usually does not need all of things
in that CP, especially the runtime CP.