Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [nebula-dev] Build

Hi,

On 02/24/2012 10:21 AM, Nicolas Richeton wrote:
The trick is to get the current display (display.getcurrent()) .  If current display is null, create a new one.
Cdatetime uses cwt as base test. Try to patch VTestCase this way. I hope this will fix a lot of tests.
I think tests should never create a Display, it is the responsability of the application that runs tests to create and manage one. In our case, the Tycho test runner has option <useUIHarness> set to true (http://git.eclipse.org/c/nebula/org.eclipse.nebula.git/tree/releng/org.eclipse.nebula.nebula-parent/pom.xml ), which means that a display is created.
You can get it Display using Display.getDefault().

If your test in intended to run in UIThread -to avoid Display.asyncExec(...)- then you should override in the pom.xml for your tests the configuration of the tycho-surefire-plugin, and add to is an <useUIThread>true</useUIThread> option.

HTH,
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets

Back to the top