Bug 458120 - [Tests] Failure in UI tests suite
Summary: [Tests] Failure in UI tests suite
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.8   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on: 461797 swtGetAlloc_ret_0_0
Blocks:
  Show dependency tree
 
Reported: 2015-01-22 06:45 EST by Lars Vogel CLA
Modified: 2018-01-16 03:36 EST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2015-01-22 06:45:20 EST
testShowView() junit.framework.AssertionFailedError: Warning: Label {Use F2 to display the description for a selected view.}
	Actual Width -> 0
	Recommended Width -> 350

org.eclipse.ui.tests.api.IWorkbenchPageTest
testBug76285(org.eclipse.ui.tests.api.IWorkbenchPageTest)
junit.framework.AssertionFailedError: expected:<5> but was:<6>

I do not see these failures on your build server, so it might that we again have an GTK3 issue.

Paul could you confirm that these tests pass fine on your Redhat installation?
Comment 1 Lars Vogel CLA 2015-01-22 06:46:46 EST
To test this start 
org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/UiTestSuite.java
Comment 2 Paul Webster CLA 2015-01-22 09:05:57 EST
UiTestSuite passes for me on RHEL 6.5
PW
Comment 3 Leo Ufimtsev CLA 2015-01-23 12:33:58 EST
Not sure if relevant, but:
FYI: there was a single test 'error' in SWT's TabFolder when ran on GTK3 that was due to a change introduced in:
Bug 454936 - [GTK3] DND does not work on TabFolder

I fixed the 'error' this morning:
https://git.eclipse.org/r/#/c/40258/

But there are also 3 failures in Color & Text if SWT is ran under GTK3 still..
Comment 4 Lars Vogel CLA 2015-01-28 10:28:47 EST
(In reply to Paul Webster from comment #2)
> UiTestSuite passes for me on RHEL 6.5
> PW

Moving to SWT for investigation, maybe similar to Bug 457464
Comment 5 Lars Vogel CLA 2015-09-02 05:30:07 EDT
I still have errors if I run the test with GTK3. Can this be evaluated by the SWT team?
Comment 6 Alexander Kurtakov CLA 2015-09-02 06:23:23 EDT
Would you please share the exact gtk 3.x version you have and the failing tests?
Comment 7 Sravan Kumar Lakkimsetti CLA 2015-10-19 08:11:24 EDT
I am trying the reproduce this.

Configuration Ubuntu 14 with GTK 3.10. this is the failed test

UiTestSuite
org.eclipse.ui.tests.UiTestSuite
org.eclipse.ui.tests.dialogs.UIAutomatedSuite
org.eclipse.ui.tests.dialogs.UIDialogsAuto
testShowView(org.eclipse.ui.tests.dialogs.UIDialogsAuto)

I did some analysis on this. Looks like the label widget is not realized when the get size is called.

Most likely the problem could be in Shell.setVisible(). We use gtk_widget_show() api to show the widget. This will show the container immediately and takes time to show its contents. 

There are two ways to resolve this
1. Not to hide the label during the creation
2. Use gtk_widget_show_all() here. This doesnot look like a good option 

When I changed this to gtk_widget_show_all there is a difference in actual width and recommended width and all the text became right aligned.

Need to investigate further on this. Moving to M4
Comment 8 Sravan Kumar Lakkimsetti CLA 2015-10-21 05:47:51 EDT
Hi Lars,

I reviewed this bug. I found the following code in createDialogArea method of class org.eclipse.ui.internal.dialogs.ShowViewDialog

// Use F2... label
descriptionHint = new Label(composite, SWT.WRAP);
descriptionHint.setText(WorkbenchMessages.ShowView_selectViewHelp);
descriptionHint.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
descriptionHint.setVisible(false);

here the label is created as invisible. 
From https://lwn.net/Articles/544395/ : Invisible widgets now return a size of 0x0.

I think this is causing the test failure in GTK3. Is there a reason why this label is created as invisible?

Thanks
Sravan
Comment 9 Sravan Kumar Lakkimsetti CLA 2015-11-24 06:15:21 EST
Hi lars,

do you have any update on this. Moving to 4.6

Thanks
Sravan
Comment 10 Sravan Kumar Lakkimsetti CLA 2015-12-04 06:09:06 EST
Hi Lars,

I think this gets fixed by Bug 465280. Can you please test this again? 

Thanks
Sravan
Comment 11 Lars Vogel CLA 2015-12-04 06:13:07 EST
(In reply to Sravan Kumar Lakkimsetti from comment #10)
> I think this gets fixed by Bug 465280. Can you please test this again? 

Sorry, didn't see your comment 8. I will test again with 4.6.0.N20151203-2000.
Comment 12 Lars Vogel CLA 2015-12-04 06:18:11 EST
(In reply to Lars Vogel from comment #11)
> Sorry, didn't see your comment 8. I will test again with
> 4.6.0.N20151203-2000.
Fix is not yet in 4.6.0.N20151203-2000, so I have to wait for the next I-Build.
Comment 13 Sravan Kumar Lakkimsetti CLA 2015-12-04 06:19:02 EST
(In reply to Lars Vogel from comment #12)
> (In reply to Lars Vogel from comment #11)
> > Sorry, didn't see your comment 8. I will test again with
> > 4.6.0.N20151203-2000.
> Fix is not yet in 4.6.0.N20151203-2000, so I have to wait for the next
> I-Build.


The bug fix went in today. So you can check this with tonight's N build/I-build
Comment 14 Arun Thondapu CLA 2015-12-08 08:11:05 EST
(In reply to Sravan Kumar Lakkimsetti from comment #13)
> (In reply to Lars Vogel from comment #12)
> > (In reply to Lars Vogel from comment #11)
> > > Sorry, didn't see your comment 8. I will test again with
> > > 4.6.0.N20151203-2000.
> > Fix is not yet in 4.6.0.N20151203-2000, so I have to wait for the next
> > I-Build.
> 
> 
> The bug fix went in today. So you can check this with tonight's N
> build/I-build

Fix for bug 465280 was reverted from M4, so I'm moving this bug also to M5.
Comment 15 Sravan Kumar Lakkimsetti CLA 2016-04-25 07:50:05 EDT
since the dependent bug 465280 is moved to 4.7, moving this to 4.7
Comment 16 Leo Ufimtsev CLA 2016-07-05 16:52:13 EDT
This bug might be related to:
497330: [Gtk3] Platform.ui test failures on Gtk
https://bugs.eclipse.org/bugs/show_bug.cgi?id=497330
Comment 17 Arun Thondapu CLA 2017-05-25 15:26:36 EDT
Moving to 4.8.
Comment 18 Alexander Kurtakov CLA 2018-01-16 03:36:59 EST
All tests are working. Closing. If/when new failure appear please open new bugs to handle them.