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.
Test claims to pass but prints out lengthy error messages. If they are expected, should be suppressed from test's standard output.
Created attachment 25338 [details] Test output (XTest mode, clean dev build, JDK 1.4)
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.
> 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.
None of the other apisupport tests print more than one line of garbage. It is quite distracting when you are looking at test output.
NbEvents.java:127 use System.err and that is the place responsible for most of the printed error. Can ErrorManager be used there instead?
Created attachment 25387 [details] Possible fix
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?
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?
"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.)
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.
Fixed as part of issue #65006.
Loading all modules is not necessary if you managed to convince the rest of the infrastructure to work without it.
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.