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 234996 - OpenEditorEnablesEditMenuFactoryTest.testIfProjectFactoryInstalled failed seven times in a row
Summary: OpenEditorEnablesEditMenuFactoryTest.testIfProjectFactoryInstalled failed sev...
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 7.4
Hardware: PC Linux
: P1 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords: 7.4_HR_FIX, TEST
Depends on: 228991
Blocks:
  Show dependency tree
 
Reported: 2013-08-26 07:45 UTC by Jaroslav Tulach
Modified: 2013-09-11 16:21 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
List of changes (341.18 KB, text/html)
2013-08-26 07:45 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2013-08-26 07:45:32 UTC
Created attachment 139232 [details]
List of changes

Together with this test also other tests in openide.text are randomly failing. I am attaching list of integrations that happened at the time of first failure. There is no commit of mine, so I expect that something has been changed in the general text infrastructure.
Comment 1 Jaroslav Tulach 2013-08-26 07:48:02 UTC
I can see two fixes for bug 228991 has been integrated. Adding dependency.
Comment 2 Jaroslav Tulach 2013-08-28 10:36:06 UTC
Mílo, are you running openide.text unit tests as part of build validation? You should I see random failures of various openide.text tests that started this week. Like the one below. I am afraid all these instabilities are caused by something in openide.text - passing to you.

org.openide.text.NotifyModifiedOnNbEditorLikeKitTest.testReloadWithoutModifiedIssue57104

Failing for the past 1 build (Since Unstable#4446 )
Took 0.32 sec.
add description
Error Message

Length it new expected:<10> but was:<0> 
Stacktrace

junit.framework.AssertionFailedError: Length it new expected:<10> but was:<0>

	at org.openide.text.NotifyModifiedTest.runTest(NotifyModifiedTest.java:117)
	at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:97)
	at org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:431)
	at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:357)
	at java.lang.Thread.run(Thread.java:722)
Caused by: junit.framework.AssertionFailedError: Length it new expected:<10> but was:<0>
	at org.openide.text.NotifyModifiedTest.testReloadWithoutModifiedIssue57104(NotifyModifiedTest.java:581)
	at org.openide.text.NotifyModifiedTest.runTest(NotifyModifiedTest.java:115)
Comment 3 Jaroslav Tulach 2013-08-28 11:06:29 UTC
The ide.ergonomics test seems to fail with:


java.lang.IllegalStateException: BaseDocument.insertString not in EDT: offset=0, text=
  org.netbeans.editor.BaseDocument.insertString(BaseDocument.java:743)
  org.netbeans.editor.BaseDocument.read(BaseDocument.java:1451)
  org.netbeans.editor.BaseKit.read(BaseKit.java:663)
  org.openide.text.DataEditorSupport.loadFromStreamToKit(:490)
  org.openide.text.DocumentOpenClose$DocumentLoad.atomicLockedRun(:760)
  org.openide.text.DocumentOpenClose$DocumentLoad.run(DocumentOpenClose.java:611)

which has been added at

180341:781d41acc048 - mmetelka 21.10.2010
#183219 - The characters move theirs position during selection.

am I not sure why it fails the test now.
Comment 4 Miloslav Metelka 2013-08-28 15:30:56 UTC
(In reply to Jaroslav Tulach from comment #2)
> Mílo, are you running openide.text unit tests as part of build validation?
Yes, sure I run unit tests of
 openide.text
 editor (some tests inherited from openide.text and tested with BaseDocument impl)
 openide.loaders

None of them was failing with the final integration of the issue 228991. But it's certainly caused by it and there must be some race condition which causes the tests to fail. I'll check that.


Regarding
java.lang.IllegalStateException: BaseDocument.insertString not in EDT: offset=0, text=
  org.netbeans.editor.BaseDocument.insertString(BaseDocument.java:743)
  ...

it looks like you have all the loggers turned on for some reason since this only happens for a logger Logger.getLogger(BaseDocument.class.getName() + "-EDT") (or parent loggers).
I'll probably remove the LOG_EDT logger and accompanying code completely since it's a bit strange for a logger to be able to trigger an ISE.
Comment 5 Miloslav Metelka 2013-09-06 07:25:35 UTC
I have disabled the EDT logger check in BaseDocument and the test now passes fine.

http://hg.netbeans.org/jet-main/rev/5386d4a46f3b

The mentioned failing openide.text tests now pass fine for me after the fix of issue 234781.

I would like to ask QE for verification.
Comment 6 Tomas Zezula 2013-09-11 16:21:21 UTC
5386d4a46f3b transplanted to c7cd87dab565