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 68940

Summary: One addition expected:<1> but was:<0>
Product: platform Reporter: Jaroslav Tulach <jtulach>
Component: ExplorerAssignee: Jaroslav Tulach <jtulach>
Status: RESOLVED WORKSFORME    
Severity: blocker Keywords: TEST
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 56311    
Bug Blocks:    

Description Jaroslav Tulach 2005-11-18 16:11:34 UTC
The test fails from time to time (about once a month). I have no idea why. 
Something is apperantly broken, maybe in nodes as the test operates just on 
models, no UI, no datasystems, etc.  
 
Probably it is necessary to add more logging to the code and the test to find 
out what is wrong. 
  
  
testRemoveInMiddle: 
      junit.framework.AssertionFailedError: One addition expected:<1> but 
was:<0> 
        at junit.framework.Assert.fail(Assert.java:47) 
        at junit.framework.Assert.failNotEquals(Assert.java:282) 
        at junit.framework.Assert.assertEquals(Assert.java:64) 
        at junit.framework.Assert.assertEquals(Assert.java:201) 
        at 
org.openide.explorer.view.ContextTreeViewModelTest$Listener.assertEvents(ContextTreeViewModelTest.java:210) 
        at 
org.openide.explorer.view.ContextTreeViewModelTest.testRemoveInMiddle(ContextTreeViewModelTest.java:170) 
        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) 
        at org.netbeans.junit.NbTestCase.runBare(NbTestCase.java:135) 
        at junit.framework.TestResult$1.protect(TestResult.java:106) 
        at junit.framework.TestResult.runProtected(TestResult.java:124) 
        at junit.framework.TestResult.run(TestResult.java:109) 
        at junit.framework.TestCase.run(TestCase.java:118) 
        at org.netbeans.junit.NbTestCase.access$001(NbTestCase.java:33) 
        at org.netbeans.junit.NbTestCase$1.run(NbTestCase.java:105) 
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199) 
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) 
        at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) 
        at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) 
        at 
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) 
        at 
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) 
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 Jaroslav Tulach 2005-11-18 16:13:15 UTC
Making P2 as if the failure appears on release50 branch, it will need to be 
solved. So at least add some logging around while we have a time. 
Comment 2 Petr Nejedly 2005-11-30 14:58:31 UTC
Yardo, can't you take it, please?
You love writting logging tests, don't you?
Comment 3 Jaroslav Tulach 2005-11-30 15:46:19 UTC
No, I do not like writing such tests at all. 
Comment 4 Jaroslav Tulach 2005-12-19 06:55:39 UTC
Issue 56311 is going to greatly simplify writing of logging tests. 
Comment 5 Jaroslav Tulach 2006-04-05 12:07:59 UTC
Logging improved.