-
-
Notifications
You must be signed in to change notification settings - Fork 304
Description
In biz.aQute.tester.junit-platform I can choose to run the tests on their own thread (the default behaviour) or register them as a service. If they are registered as a service, the service always has the attribute main.thread=true, which means aQute.launcher.Launcher picks it up and runs it on the main thread.
I would like the option to register the service without main.thread=true so that I can run it at a different time.
Motivation: I am migrating an old RCP application to Bnd. It has many tests (thousands) that rely on the workbench being up and running, and/or which need to run in the Eclipse UI thread. So I would like to hook into Eclipse's support for workbench tests by obtaining the tester Runnable and then doing this:
PlatformUI.getTestableObject().setTestHarness(() -> Display.getDefault().asyncExec(runnable));Simply omitting main.thread=true from the service registration is enough to make this work, because then I can find the service by filtering on (&(objectclass=java.lang.Runnable)(service.description=JUnit tester)).