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 184695 - Failures in dynamic ModifyDocumentTest
Summary: Failures in dynamic ModifyDocumentTest
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-22 08:45 UTC by Vladimir Voskresensky
Modified: 2010-04-24 05:24 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 Vladimir Voskresensky 2010-04-22 08:45:10 UTC
org.netbeans.modules.cnd.modelimpl.csm.core.ModifyDocumentTest
http://elif.russia.sun.com:8080/hudson/job/test-modelimpl-winxp/937/testReport/junit/org.netbeans.modules.cnd.modelimpl.csm.core/ModifyDocumentTest/testRemoveDeadBlock

This test emulates modification of documents by inserting/deleting parts of code and then checking consistency of code model for the associated file.
It fails randomly giving an info that we have issues in editing phase
Comment 1 Vladimir Voskresensky 2010-04-22 11:50:26 UTC
one reason:
- clean of buffers on modelsupport shutdown
http://hg.netbeans.org/cnd-main?cmd=changeset;node=7af6de1f51a9

another reason:
- on document modification all modified documents are queued
- but using only one queue => each next can cancel previous
=> introduced task per file
http://hg.netbeans.org/cnd-main?cmd=changeset;node=2f722c9a1c1b
http://hg.netbeans.org/cnd-main?cmd=changeset;node=4dd7cdd78ad4
also changing buffer + attaching/detaching listeners from buffer are synced

another reason:
http://hg.netbeans.org/cnd-main?cmd=changeset;node=052ddfbb1e1d
=> two parse events were sent
http://hg.netbeans.org/cnd-main?cmd=changeset;node=d7c5e9f37353
because modifying document caused ModelSupport to get stateChanged from DataObject.registry()
then in this thread (EDT) new buffer is created and attached as listener to buffer. That results in adding listener to the document at the end of listeners list => listener would be notified immediately
Comment 2 Vladimir Voskresensky 2010-04-22 11:51:09 UTC
editing info is stored in separate struct:
http://hg.netbeans.org/cnd-main?cmd=changeset;node=0bd8af73712f
Comment 3 Vladimir Voskresensky 2010-04-22 16:40:06 UTC
no failures during last 40 builds
Comment 4 Quality Engineering 2010-04-24 05:24:09 UTC
Integrated into 'main-golden', will be available in build *201004240200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/fab7398d241a
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixing #184695 -  Failures in dynamic ModifyDocumentTest
- modified files are tracked by different handlers