Bug 246157 - HudsonInstanceImplTest.testJobWithoutSomePropertiesCanBeCreated cannot find NbPreferences
HudsonInstanceImplTest.testJobWithoutSomePropertiesCanBeCreated cannot find N...
Status: RESOLVED FIXED
Product: connecteddeveloper
Classification: Unclassified
Component: Hudson
8.0.1
PC Linux
: P2 (vote)
: 8.1
Assigned To: Jaroslav Havlin
issues@connecteddeveloper
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-31 08:44 UTC by Jaroslav Tulach
Modified: 2014-08-07 14:47 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2014-07-31 08:44:50 UTC
I am getting random failures of this test when running 
http://deadlock.netbeans.org/job/ergonomics/
During last week, it failed at least twice.


junit.framework.AssertionFailedError
	at org.netbeans.modules.hudson.impl.HudsonInstanceImplTest.testJobWithoutSomePropertiesCanBeCreated(HudsonInstanceImplTest.java:193)
Standard Error

Jul 31, 2014 6:19:56 AM org.openide.util.NbPreferences getPreferencesProvider
WARNING: NetBeans implementation of Preferences not found
AWT blocker activation interrupted:
java.lang.InterruptedException
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:503)
	at sun.awt.AWTAutoShutdown.activateBlockerThread(AWTAutoShutdown.java:337)
	at sun.awt.AWTAutoShutdown.notifyThreadBusy(AWTAutoShutdown.java:171)
	at java.awt.EventQueue.initDispatchThread(EventQueue.java:1050)
	at java.awt.EventQueue.postEventPrivate(EventQueue.java:270)
	at java.awt.EventQueue.postEvent(EventQueue.java:245)
	at java.awt.EventQueue.invokeLater(EventQueue.java:1217)
	at javax.swing.SwingUtilities.invokeLater(SwingUtilities.java:1290)
	at org.netbeans.modules.progress.spi.Controller.runImmediately(Controller.java:217)
	at org.netbeans.modules.progress.spi.Controller.start(Controller.java:142)
	at org.netbeans.modules.progress.spi.InternalHandle.start(InternalHandle.java:232)
	at org.netbeans.api.progress.ProgressHandle.start(ProgressHandle.java:99)
	at org.netbeans.api.progress.ProgressHandle.start(ProgressHandle.java:77)
	at org.netbeans.modules.hudson.impl.HudsonInstanceImpl.doSynchronize(HudsonInstanceImpl.java:361)
	at org.netbeans.modules.hudson.impl.HudsonInstanceImpl.access$000(HudsonInstanceImpl.java:93)
	at org.netbeans.modules.hudson.impl.HudsonInstanceImpl$1.run(HudsonInstanceImpl.java:136)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
Comment 1 Ondrej Vrabec 2014-07-31 10:49:21 UTC
failed also in NB-Core-build several times:
Jul 29, 2014 1:19:32 PM org.openide.util.NbPreferences getPreferencesProvider
WARNING: NetBeans implementation of Preferences not found
AWT blocker activation interrupted:
java.lang.InterruptedException
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:503)
	at sun.awt.AWTAutoShutdown.activateBlockerThread(AWTAutoShutdown.java:337)
	at sun.awt.AWTAutoShutdown.notifyThreadBusy(AWTAutoShutdown.java:171)
	at java.awt.EventQueue.initDispatchThread(EventQueue.java:1050)
	at java.awt.EventQueue.postEventPrivate(EventQueue.java:270)
	at java.awt.EventQueue.postEvent(EventQueue.java:245)
	at java.awt.EventQueue.invokeLater(EventQueue.java:1217)
	at javax.swing.SwingUtilities.invokeLater(SwingUtilities.java:1290)
	at org.netbeans.modules.progress.spi.Controller.runImmediately(Controller.java:217)
	at org.netbeans.modules.progress.spi.Controller.start(Controller.java:142)
	at org.netbeans.modules.progress.spi.InternalHandle.start(InternalHandle.java:232)
	at org.netbeans.api.progress.ProgressHandle.start(ProgressHandle.java:99)
	at org.netbeans.api.progress.ProgressHandle.start(ProgressHandle.java:77)
	at org.netbeans.modules.hudson.impl.HudsonInstanceImpl.doSynchronize(HudsonInstanceImpl.java:361)
	at org.netbeans.modules.hudson.impl.HudsonInstanceImpl.access$000(HudsonInstanceImpl.java:93)
	at org.netbeans.modules.hudson.impl.HudsonInstanceImpl$1.run(HudsonInstanceImpl.java:136)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
Jul 29, 2014 1:19:32 PM org.openide.util.RequestProcessor$Processor doNotify
SEVERE: Error in RequestProcessor org.netbeans.modules.hudson.impl.HudsonInstanceProperties$2
org.openide.util.RequestProcessor$SlowItem: task failed due to: java.lang.IllegalStateException: Node has been removed.
	at org.openide.util.RequestProcessor.post(RequestProcessor.java:419)
	at org.netbeans.modules.hudson.impl.HudsonInstanceProperties.loadPreferences(HudsonInstanceProperties.java:212)
	at org.netbeans.modules.hudson.impl.HudsonInstanceProperties.put(HudsonInstanceProperties.java:88)
	at org.netbeans.modules.hudson.impl.HudsonInstanceProperties.<init>(HudsonInstanceProperties.java:74)
	at org.netbeans.modules.hudson.impl.HudsonInstanceImpl.createHudsonInstance(HudsonInstanceImpl.java:183)
	at org.netbeans.modules.hudson.impl.HudsonInstanceImplTest.testHudsonInstanceImplPersistenceIsNotNull(HudsonInstanceImplTest.java:76)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
	at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:522)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1062)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:913)
Caused by: java.lang.IllegalStateException: Node has been removed.
	at java.util.prefs.AbstractPreferences.get(AbstractPreferences.java:283)
	at org.netbeans.modules.hudson.impl.HudsonInstanceProperties$2.run(HudsonInstanceProperties.java:225)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)


There is a race condition in the test. HudsonManager.addInstance immediately refreshes the hudson jobs in the constructor before .addHudsonChangeListener has a chance to be called. Then hi.synchronize(false) does nothing actually and does not notify the listener.
Comment 2 Jaroslav Havlin 2014-08-05 15:39:52 UTC
> There is a race condition in the test. HudsonManager.addInstance immediately
> refreshes the hudson jobs in the constructor before .addHudsonChangeListener
> has a chance to be called. Then hi.synchronize(false) does nothing actually and
> does not notify the listener.
Thank you very much, Ondra, for evaluation!

http://hg.netbeans.org/core-main/rev/85b38a74e54e
Comment 3 Quality Engineering 2014-08-06 02:39:02 UTC
Integrated into 'main-silver', will be available in build *201408060001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/85b38a74e54e
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #246157: Race condition in HudsonInstanceImplTest
Comment 4 Jaroslav Havlin 2014-08-06 11:38:32 UTC
http://hg.netbeans.org/releases/rev/bf4a18630601
Integrated into release801 branch.
Comment 5 Quality Engineering 2014-08-07 14:47:49 UTC
Integrated into 'releases/release801', will be available in build *201408071314* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/bf4a18630601
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #246157: Race condition in HudsonInstanceImplTest


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