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 253938 - Please stabilize TemplatesPanelTest.testIgnoresSimplefolders
Summary: Please stabilize TemplatesPanelTest.testIgnoresSimplefolders
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Templates (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-29 09:38 UTC by Ondrej Vrabec
Modified: 2015-07-31 01:50 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Test failure can be reproduced after this change. (771 bytes, patch)
2015-07-29 16:34 UTC, Martin Entlicher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ondrej Vrabec 2015-07-29 09:38:58 UTC
http://deadlock.netbeans.org/job/NB-Core-Build/4343/

Fails from time to time, but quite often.
Comment 1 Martin Entlicher 2015-07-29 09:58:28 UTC
Agreed, I also noticed.
Comment 2 Martin Entlicher 2015-07-29 13:09:54 UTC
Error Message

Empty: [org.netbeans.modules.templates.ui.TemplatesPanel$TemplateNode[name=null][Name=SimpleFolder, displayName=SimpleFolder]] expected:<0> but was:<1>

Stacktrace

junit.framework.AssertionFailedError: Empty: [org.netbeans.modules.templates.ui.TemplatesPanel$TemplateNode[name=null][Name=SimpleFolder, displayName=SimpleFolder]] expected:<0> but was:<1>
	at org.netbeans.modules.templates.ui.TemplatesPanelTest.testIgnoresSimplefolders(TemplatesPanelTest.java:136)
	at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:102)
	at org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:478)
	at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:404)
	at java.lang.Thread.run(Thread.java:744)


I'm not able to reproduce that locally.
Comment 3 Martin Entlicher 2015-07-29 13:46:11 UTC
It happened to me once.
I've a suspicion that FileObject.get/setAttribute() is involved in this issue.
We call fo.setAttribute() in a different thread than fo.getAttribute().
Comment 4 Martin Entlicher 2015-07-29 14:36:07 UTC
Pushed two stabilization changes:
http://hg.netbeans.org/core-main/rev/3d673895ae63
http://hg.netbeans.org/core-main/rev/9065675b8994
Unfortunately, the test still fails, sometimes.
Comment 5 Martin Entlicher 2015-07-29 16:34:00 UTC
Created attachment 155015 [details]
Test failure can be reproduced after this change.
Comment 6 Martin Entlicher 2015-07-30 06:14:05 UTC
Finally fixed by changeset:   290366:970475ff1d8d
http://hg.netbeans.org/core-main/rev/970475ff1d8d
Comment 7 Quality Engineering 2015-07-31 01:50:35 UTC
Integrated into 'main-silver', will be available in build *201507310002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/9065675b8994
User: mentlicher@netbeans.org
Log: #253938: Synchronize the access to attr. It does not fix the test failure though.