[JIRA] (GLAZEDLISTS-594) Fix broken GUI-related tests after move to JUnit 4

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[JIRA] (GLAZEDLISTS-594) Fix broken GUI-related tests after move to JUnit 4

JIRA jira-no-reply@java.net

     [ https://java.net/jira/browse/GLAZEDLISTS-594?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

brands resolved GLAZEDLISTS-594.
--------------------------------

    Resolution: Fixed

> Fix broken GUI-related tests after move to JUnit 4
> --------------------------------------------------
>
>                 Key: GLAZEDLISTS-594
>                 URL: https://java.net/jira/browse/GLAZEDLISTS-594
>             Project: glazedlists
>          Issue Type: Bug
>          Components: swt
>    Affects Versions: 1.9.1
>            Reporter: brands
>            Assignee: brands
>             Fix For: 1.10.0
>
>
> After the move to JUnit 4 GUI-related testing support for Swing and SWT was refactored to use JUnit rules.
> Those rules ensure that all test methods of a GUI test class are run on the GUI thread of the corresponding toolkit (Swing or SWT).
> For the SWT case, a dedicated, separate thread was picked in the SWT rules as GUI thread. This turned out to be a problem on other platforms such as MacOs. At least on Mac it' seems to be a requirement for the GUI thread to be the main thread. Also, VM argument "-XstartOnFirstThread" seems to be required on Mac.
> So this fix will include the following:
> - create the SWT stuff (display, shell) on the main thread
> - rename @ExecuteOnMainThread to something like @ExecuteOnNonUIThread
> - run  SWT @ExecuteOnNonUIThread tests on a thread different to the main thread (= SWT display thread)
> - ignore SWT tests on Mac that create a custom display on a different thread
> - in the ANT build add the -XstartOnFirstThread flag when executing unit tests on Mac



--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
Loading...