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 47022 - many failures in UndoRedoTest
Summary: many failures in UndoRedoTest
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: TEST
Depends on:
Blocks:
 
Reported: 2004-08-09 16:48 UTC by pzajac
Modified: 2008-12-22 21:37 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
test log (16.87 KB, text/plain)
2004-08-09 16:48 UTC, pzajac
Details
exception stacktrace (16.87 KB, text/plain)
2004-08-11 14:21 UTC, pzajac
Details
test log (10.74 KB, text/plain)
2004-08-18 09:22 UTC, pzajac
Details
Moving addUndo*Listener before any notifyAll (5.68 KB, patch)
2004-08-24 09:12 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description pzajac 2004-08-09 16:48:34 UTC
[200408081800]
The first occurence of test failure is probably
for build [2004080200].
Comment 1 pzajac 2004-08-09 16:48:58 UTC
Created attachment 16702 [details]
test log
Comment 2 Jaroslav Tulach 2004-08-10 13:15:31 UTC
This test contains no threading and works on my jdk1.4.2-b28 I need
more information about your VMs I am affraid. 
Comment 3 Jaroslav Tulach 2004-08-10 13:21:25 UTC
Still I added invokeAndWait, but this is likely not any fix.

openide/test/unit/src/org/openide/text/UndoRedoTest.java,v  <-- 
UndoRedoTest.java
new revision: 1.3
Comment 4 Miloslav Metelka 2004-08-10 13:59:15 UTC
BTW on yesterday Monday morning I have integrated some editor
document-related fixes that could possibly affect undo but I have
manually tested them and they worked fine and as Petr said the first
occurrence of the test failure was likely on 08/02 which was prior to
my integration. Anyway I'll recheck them again.
Comment 5 Jaroslav Tulach 2004-08-10 16:48:32 UTC
UndoRedoTest is pure unit test. You would need to do changes in openide.
Comment 6 pzajac 2004-08-11 14:20:35 UTC
the test fails again on Windows XP and Windows 2000.
Comment 7 pzajac 2004-08-11 14:21:12 UTC
Created attachment 16747 [details]
exception stacktrace
Comment 8 Jaroslav Tulach 2004-08-16 14:07:56 UTC
I've added new assert.

openide/test/unit/src/org/openide/text/UndoRedoTest.java,v  <-- 
UndoRedoTest.java
new revision: 1.4
Comment 9 pzajac 2004-08-18 09:21:23 UTC
The tests fails again on Win2k and Win XP.
Comment 10 pzajac 2004-08-18 09:22:12 UTC
Created attachment 16904 [details]
test log
Comment 11 Jaroslav Tulach 2004-08-24 09:11:27 UTC
Guys, I guess I have  investigated the problem. It is in the fact 
that one can get access to a document (using openDocument) sooner 
then a UndoableListener is attached to it. I have no idea why, it is 
that way, so your review would be welcomed. I am going to attach the 
change in the CES (including debugging messages that made me realize 
that notify1 is called sooner than add1).
Comment 12 Jaroslav Tulach 2004-08-24 09:12:56 UTC
Created attachment 17059 [details]
Moving addUndo*Listener before any notifyAll
Comment 13 Jaroslav Tulach 2004-08-24 16:02:20 UTC
cvs -q ci -m "#47022: Fixing race condition observed by UndoRedoTest
on windows"
Checking in src/org/openide/text/CloneableEditorSupport.java;
/cvs/openide/src/org/openide/text/CloneableEditorSupport.java,v  <-- 
CloneableEditorSupport.java
new revision: 1.132;
Comment 14 Jaroslav Tulach 2004-08-24 16:02:57 UTC
So it is fixed.
Comment 15 pzajac 2004-08-27 12:48:23 UTC
v