Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seeing intermittent problems where Red Deer is unable to close all shells after a test has run #1300

Closed
ldimaggi opened this issue Nov 12, 2015 · 3 comments
Assignees
Milestone

Comments

@ldimaggi
Copy link
Contributor

This problem has been showing up in tests such as this:

http://machydra.brq.redhat.com:8080/job/jbds-master-nightly.smoke.ui.test/jdk=oraclejdk1.8,label=domek/13/testReport/org.jboss.tools.mylyn.ui.bot.test/MylynTestBzQuery/testEclipseBugzilla_default/

The problem takes (2) forms:

  1. Shells such as Eclipse/JBDS Notifications are sometimes not closed.

  2. An error is displayed indicating that a shell with a null title cannot be closed:

java.lang.AssertionError: The following shells remained open []
at org.junit.Assert.fail(Assert.java:88)
at org.jboss.reddeer.junit.extension.after.test.impl.CloseAllShellsExt.run(CloseAllShellsExt.java:68)
at org.jboss.reddeer.junit.extension.after.test.impl.CloseAllShellsExt.runAfterTest(CloseAllShellsExt.java:60)

This is not a blocking issue - it can be worked around:

    if (new ShellWithTextIsAvailable("").test()) {
        log.info("Closing shell - null title");
        new DefaultShell("").close();
    }

But - it would better if Red Deer could reliably close all the shells. Thx!

@rawagner
Copy link
Member

Exception is actually ok - CloseAllShellsExt closes the notification popup and throws exception (to notify you about shell that was left open after test execution).

Problem is that notification popups do not have standardized API yet[1] so we dont do anything special about them.

Mylyn implements notification popus in a way that they don't have a title so that's why you get that confusing exception message "The following shells remained open []"

Im adding this to mtg agenda to discuss possible solutions if any

[1]https://wiki.eclipse.org/Platform_UI/Notifications

@ldimaggi
Copy link
Contributor Author

The exception is caught, but the tests still fail. Is there some way that
we can configure Red Deer to trap (and report on) these exceptions, but not
have the tests fail?

-- Len

On Fri, Nov 13, 2015 at 6:28 AM, rawagner notifications@github.com wrote:

Exception is actually ok - CloseAllShellsExt closes the notification popup
and throws exception (to notify you about shell that was left open after
test execution).

Problem is that notification popups do not have standardized API yet[1] so
we dont do anything special about them.

Mylyn implements notification popus in a way that they don't have a title
so that's why you get that confusing exception message "The following
shells remained open []"

Im adding this to mtg agenda to discuss possible solutions if any

[1]https://wiki.eclipse.org/Platform_UI/Notifications


Reply to this email directly or view it on GitHub
#1300 (comment)
.

Len DiMaggio (ldimaggi@redhat.com)
JBoss by Red Hat
314 Littleton Road
Westford, MA 01886 USA
tel: 978.392.3179
cell: 781.472.9912
http://www.redhat.com
http://community.jboss.org/people/ldimaggio

@rawagner
Copy link
Member

There's no way to configure CloseAllShells to behave like that. The only thing you can do is to disable it (reddeer.close.shells=false) but then you will have to take care of shells that are left open after test execution.

@rawagner rawagner added this to the REMOVED milestone Oct 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants