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 242357 - Failing org.openide.text.CloneableEditorSupportCOSRedirectorTest.testGetInputStreamWhenClosed
Summary: Failing org.openide.text.CloneableEditorSupportCOSRedirectorTest.testGetInput...
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords: TEST
Depends on: 241991
Blocks:
  Show dependency tree
 
Reported: 2014-02-26 10:44 UTC by Jiri Skrivanek
Modified: 2014-04-24 02:13 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 Jiri Skrivanek 2014-02-26 10:44:13 UTC
org.openide.text.CloneableEditorSupportCOSRedirectorTest.testGetInputStreamWhenClosed fails reliably when I put breakpoint at line 183 and continue after while.

junit.framework.AssertionFailedError: The document is supposed to be still closed
	at org.openide.text.CloneableEditorSupportCOSRedirectorTest.testGetInputStreamWhenClosed(CloneableEditorSupportCOSRedirectorTest.java:183)

----------------------------
Evaluation done by mmetelka:
The CloneableEditorSupportCOSRedirectorTest.testGetInputStreamWhenClosed() may IMHO cause random failures. If I add a breakpoint into DOC.open() I get the following call during the test:

java.lang.Exception: Stack trace
    at java.lang.Thread.dumpStack(Thread.java:1344)
    at org.openide.text.DocumentOpenClose.open(DocumentOpenClose.java:197)
    at org.openide.text.CloneableEditorSupport.openDocument(CloneableEditorSupport.java:573)
    at org.openide.text.CloneableEditorInitializer.initDocument(CloneableEditorInitializer.java:416)
    at org.openide.text.CloneableEditorInitializer.run(CloneableEditorInitializer.java:329)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)

which is likely caused by the asynchronous processing of

        red.master.open();
so if
        assertNull("The document is supposed to be still closed", red.master.getDocument ());

is quick enough the document opening won't finish yet but it might be (if breakpoint is put on the line and some waiting is done). It was just a quick look correct me if I overlooked something.
Comment 1 Vladimir Voskresensky 2014-02-26 14:03:01 UTC
I will have a look
Comment 2 Vladimir Voskresensky 2014-02-26 14:50:35 UTC
fixed
http://hg.netbeans.org/cnd-main/rev/94b618bf8ffd
Comment 3 Quality Engineering 2014-02-27 02:37:09 UTC
Integrated into 'main-silver', will be available in build *201402270001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/94b618bf8ffd
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #242357 - Failing org.openide.text.CloneableEditorSupportCOSRedirectorTest.testGetInputStreamWhenClosed
- there is no need in testGetInputStreamWhenClosed, because we check opened editors
Comment 4 Quality Engineering 2014-03-03 00:47:08 UTC
Integrated into 'releases/release80', will be available in build *201403022200* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/c94a42d756ee
User: Jiri Skrivanek <jskrivanek@netbeans.org>
Log: #242357 - Excluded randomly failing test.
Comment 5 Quality Engineering 2014-04-24 02:13:10 UTC
Integrated into 'releases/release80', will be available in build *201404240045* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/65e5720f98b2
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #242357 - Failing org.openide.text.CloneableEditorSupportCOSRedirectorTest.testGetInputStreamWhenClosed
- there is no need in testGetInputStreamWhenClosed, because we check opened editors
(transplanted from 94b618bf8ffdd4e7eaadd0a37661d351637a658f)