Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 210773 - EnabledModulesCollectorTest.testSetOfEnabledModulesIsListed() randomly fails
EnabledModulesCollectorTest.testSetOfEnabledModulesIsListed() randomly fails
Product: ide
Classification: Unclassified
Component: Logger
PC Linux
: P3 (vote)
: 7.2
Assigned To: Martin Entlicher
Depends on:
  Show dependency treegraph
Reported: 2012-04-05 12:42 UTC by Martin Entlicher
Modified: 2012-04-06 10:07 UTC (History)
0 users

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description Martin Entlicher 2012-04-05 12:42:39 UTC
This test depends on threading.
When I put a breakpoint into Installer.writeOut() method and run the test under debugger, it fails after the thread is suspended on the breakpoint.

It randomly fails in the test environment - see

1 tests failed.
REGRESSION:  org.netbeans.modules.uihandler.EnabledModulesCollectorTest.testSetOfEnabledModulesIsListed

Error Message:
One record for disabled and one for enabled: [] expected:<2> but was:<0>

Stack Trace:
junit.framework.AssertionFailedError: One record for disabled and one for enabled: [] expected:<2> but was:<0>
	at org.netbeans.modules.uihandler.EnabledModulesCollectorTest.testSetOfEnabledModulesIsListed(
	at org.netbeans.junit.NbTestCase.access$200(
	at org.netbeans.junit.NbTestCase$2.doSomething(
	at org.netbeans.junit.NbTestCase$
Comment 1 Martin Entlicher 2012-04-05 13:19:47 UTC
Apparently, to wait 1s in lastRecord.waitFinished(1000); is not enough.

The waitFinished(1000) is called two times in the test - once from installer.closing() and once from Installer.getLogs(). Thus even 2s wait time is not enough. There is really an extremely slow threads execution on the testing machine.

Why is there the timeout at all? It does not wait till flushed with the timeout, thus breaking the contract.
Comment 2 Martin Entlicher 2012-04-05 13:22:38 UTC
The timeout is changed to indefinite in changeset:   217960:3febf5809ae5
Comment 3 Quality Engineering 2012-04-06 10:07:46 UTC
Integrated into 'main-golden', will be available in build *201204060400* on (upload may still be in progress)
Log: testSetOfEnabledModulesIsListed() marked as @RandomlyFails until issue #210773 is fixed.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo