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 - One addition expected:<1> but was:<0>
Summary: One addition expected:<1> but was:<0>
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: TEST
Depends on: 56311
Blocks:
  Show dependency tree
 
Reported: 2005-11-18 16:11 UTC by Jaroslav Tulach
Modified: 2008-12-22 15:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.