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 35972

Summary: Options tree test automation broken
Product: platform Reporter: Jiri Skrivanek <jskrivanek>
Component: NodesAssignee: Jesse Glick <jglick>
Status: VERIFIED DUPLICATE    
Severity: blocker CC: jglick
Priority: P3 Keywords: T9Y
Version: 3.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 36005    
Bug Blocks:    
Attachments: Screen shot

Description Jiri Skrivanek 2003-09-09 14:39:31 UTC
IDE commit validation is broken, that's why it is
P1. Usecase is the following:

- open Options from main menu
- select Editing|Java Sources
- find appropriate property sheet

I suspect that Options tree is generated, test
selects "Java Sources" node, property sheet is
shown, but Options tree is somehow refreshed and
property sheet disappears. So the final state is
that the node is NOT selected, property sheet is
NOT shown, "Java Sources" label IS shown in
description area (see screen shot).
I cannot reproduce it manually but it is 100%
reproducable in automated tests. It happens only
on Linux and Solaris, JDK1.4.1. It started to
happen on monday 8th September, after the outage,
so it is not possible to precisly determine what
commit it caused. Anyway, it failed for the first
time in build 20030908-0621.
To run the test:

cd nb_all/ide/test
ant -Dxtest.attribs=commit
-Dxtest.testtype=qa-functional

If you don't want to wait, you can comment out all
tests but testOptions.
Comment 1 Jiri Skrivanek 2003-09-09 14:40:29 UTC
Created attachment 11555 [details]
Screen shot
Comment 2 Petr Hrebejk 2003-09-09 15:33:13 UTC
Couldn't that be the same thing as failing tests in Looks Jesse?
Comment 3 Jesse Glick 2003-09-09 15:58:35 UTC
As you say, it is not reproducible manually, so somehow the test does
not match reality. Please try to figure out what you want the Options
window to do differently and request that (or change the test if it is
easy). Changed threading a bit to be more in the event queue, and also
to expand the nodes in the window after opening it, but I have no idea
what your test is actually checking for.
Comment 4 Jiri Skrivanek 2003-09-10 08:48:19 UTC
> As you say, it is not reproducible manually, so somehow the test
> does not match reality. 

Test is just faster than regular user. It doesn't do anything than a user.

> Please try to figure out what you want the Options
> window to do differently and request that (or change the test if it 
> is easy). Changed threading a bit to be more in the event queue, and
> also to expand the nodes in the window after opening it, but I have 
> no idea what your test is actually checking for.

Test checks some properties in Options window. But it fails in its
early stage because of described misbehaviour. I will try to explain
it once more. 

- open Options by main menu (Tools|Options)
- windows is opened and Options tree is being generated
- Options tree is made visible
- test finds Options tree and particular node within the tree
- test selects the node
- property sheet for the node is shown in Options window
- BUT now the node is deselected, property sheet disappears, only
description area shows hint for previously selected node
- test fails because it cannot find property sheet

I haven't looked at sources, so I don't know if it is a threading
issue or some wrong sequence in code. But I think that correct
behaviour should be

- deselect nodes (or do whatever initialization of the tree)
- make tree visible (or enabled)

Then test will wait until tree is visible/enabled, and it will select
a node after that.
Do you think it is possible to fix IDE such a way?


Comment 5 Jesse Glick 2003-09-10 17:49:27 UTC
Well for the time being I suggest you just make the test wait a moment.

If a node selected during the initial opening is deselected later
during expansion, that sounds like a bug in explorer views or property
sheet, not sure. I can try to check. I can't reproduce any problem
manually; it is too fast to see.
Comment 6 Jiri Skrivanek 2003-09-11 10:03:03 UTC
I updated the test to work around the problem. When it is fixed I will
remove it.
Comment 7 Jesse Glick 2003-09-11 13:59:39 UTC
OK, I see your patch in IDEValidation.java.
Comment 8 Jesse Glick 2003-09-12 17:05:53 UTC

*** This issue has been marked as a duplicate of 36005 ***
Comment 9 Jiri Skrivanek 2003-09-15 07:58:11 UTC
Verified duplicated.