Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335970

Summary: [ErrorHandling] StatusDialogManagerTest test failures: testBug275867, testSupport2
Product: [Eclipse Project] Platform Reporter: Oleg Besedin <ob1.eclipse>
Component: UIAssignee: Krzysztof Daniel <krzysztof.daniel>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, krzysztof.daniel, ob1.eclipse, pwebster, remy.suen
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Bug Depends on: 336682, 336684    
Bug Blocks:    

Description Oleg Besedin CLA 2011-02-01 10:21:54 EST
The nightly build has two JUnit failures, on Linux only:

http://download.eclipse.org/eclipse/downloads/drops/N20110131-2000/testresults/html/org.eclipse.ui.tests_linux.gtk.x86_6.0.html

testSupport2:
expected:<org.eclipse.ui.statushandlers.StatusAdapter@daa38f> but was:<null>

junit.framework.AssertionFailedError: expected:<org.eclipse.ui.statushandlers.StatusAdapter@daa38f> but was:<null>
at org.eclipse.ui.tests.statushandlers.StatusDialogManagerTest.testSupport2(StatusDialogManagerTest.java:434)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:416)

and

testBug274867:

unit.framework.AssertionFailedError: null
at org.eclipse.ui.tests.statushandlers.StatusDialogManagerTest.testBug274867(StatusDialogManagerTest.java:704)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:416)

(Note: the "testBug274867" actually refers to the bug 275867 ; I've updated the method name in CVS Head.)

It seems that the test failures were caused by the message dialog not showing up for those two tests.

Tests pass fine for me on WinXP machine.
Comment 1 Remy Suen CLA 2011-02-01 10:33:15 EST
(In reply to comment #0)
> Tests pass fine for me on WinXP machine.

Same. I had to run the entire suite before delivering some bug fixes and it was all green.
Comment 2 Oleg Besedin CLA 2011-02-08 11:39:31 EST
Tests failed again in N20110207-2000 with the same stack traces for testBug275867, testSupport2 and the new failure testSelfClosure again related to the status handler:

junit.framework.AssertionFailedError: null
at org.eclipse.ui.tests.statushandlers.SupportTrayTest.testSelfClosure(SupportTrayTest.java:142)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:416)
Comment 3 Krzysztof Daniel CLA 2011-02-08 14:48:49 EST
I'll check this this week.
Comment 4 Krzysztof Daniel CLA 2011-02-09 03:12:56 EST
Exception in testSelfClosure is caused by TrayDialog (comments mine):

//focusControl may be null!
Control focusControl = shell.getDisplay().getFocusControl();
if (isContained(shell, focusControl)) {

private boolean isContained(Control container, Control control) {
		Composite parent;
                // control.getParent() throws NPE
		while ((parent = control.getParent()) != null) {
Comment 5 Krzysztof Daniel CLA 2011-02-09 06:45:49 EST
The error happens when the test machine is busy - the dialog is not visible when the checking happens. There is more tests that can fail, although there is no effect on the end user.
Comment 6 Oleg Besedin CLA 2011-04-29 09:38:56 EDT
The M7 is done.
Comment 7 Lars Vogel CLA 2019-11-14 02:15:23 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.