Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] Failing search console automated tests

Hi Paul,

 

> Yes, they're run as PDE tests.  It looks like the code that is calling Test.setupViewAccessor(*) is running before the workbench has completely initialized. 

> Is it being started deliberately through OSGi?  Most bundles with the "Bundle-ActivationPolicy: lazy" won't run into this problem.
Test bundles do not specify activation policy explicitly. I will give it a try to do so

 

> What is your SWTBot test launching as to run outside the UI thread?  What application and/or product does it use? 

A successful SWTBot test execution uses “org.eclipse.swtbot.eclipse.core.swtbottestapplication”. According to the test log, the application is “org.eclipse.test.uitestapplication”. So, how do I specify the “-appication” to be the correct one?

 

Thanks!

 

Danail

 

From: e4-dev-bounces@xxxxxxxxxxx [mailto:e4-dev-bounces@xxxxxxxxxxx] On Behalf Of Paul Webster
Sent: Monday, February 27, 2012 3:17 PM
To: E4 Project developer mailing list
Subject: Re: [e4-dev] Failing search console automated tests

 

Hi Danail,

On Mon, Feb 27, 2012 at 3:13 AM, Branekov, Danail <danail.branekov@xxxxxxx> wrote:

The search console JUnit tests are already part of the test execution but there are quite a lot of weird failures:

1. There are quite a lot of IllegalStateExceptions thrown when calling PlatformUI.getWorkbench, for example

java.lang.IllegalStateException: Workbench has not been created yet.

at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:92)

at org.eclipse.platform.discovery.integration.test.unit.internal.SaveInFavoritesViewCustomizationTest.setupViewAccessor(SaveInFavoritesViewCustomizationTest.java:102)

How can the workbench not be created? Tests are executed as PDE tests, right?


Yes, they're run as PDE tests.  It looks like the code that is calling Test.setupViewAccessor(*) is running before the workbench has completely initialized.  Is it being started deliberately through OSGi?  Most bundles with the "Bundle-ActivationPolicy: lazy" won't run into this problem.
 

 2. One of the SWTBot tests fails with an error saying that the tests must be executed out of the UI thread (SlidingCompositeTest.testProgressMonitorCanBeCancelledOutOfUiThread()). The failure is caused by Display.getCurrent() not returning null. Indeed, SWTBot tests _must_ be run out of the UI thread. Or do I need to somehow explicitly specify somewhere that a test suite should be executed as a SWTBot test?

 

What is your SWTBot test launching as to run outside the UI thread?  What application and/or product does it use?  If the launcher isn't clear, you can always look at the properties of a successful launch in the Debug view, it has the command line used to launch them.
 

 

Is the eclipse workspace log file produced while a test suite execution preserved somewhere? I suspect that it can provide valuable details for troubleshooting these failures



--
Paul Webster
Hi floor.  Make me a sammich! - GIR


Back to the top