eclipse / Xpect

This repository has been rewritten to move to the Eclipse Foundation. Find the old history here: https://github.com/TypeFox/Xpect
http://www.xpect-tests.org/
Eclipse Public License 2.0
30 stars 28 forks source link

Extract parts of XpectRunner singleton #344

Closed trancexpress closed 2 months ago

trancexpress commented 3 months ago

This change extracts parts of the singleton XpectRunner to another class, so that other implementations can set the values of the singleton.

This change is required, in order to provide alternatives of XpectRunner, such as a JUnit 5 alternative, without depending on XpectRunner.

Preparation for: #262

trancexpress commented 3 months ago

This is a subset of https://github.com/eclipse/Xpect/pull/343, the minimal set of changes we need to port our Xpect tests to JUnit 5. If the actual PR causes too much debate / overhead or there is no one to review such big changes, this smaller set of changes would also be enough for us.

trancexpress commented 3 months ago

@tjeske , could you take a look here? Its a small change, but needed.

Or maybe you can take a look @cdietrich ?

iloveeclipse commented 2 months ago

@cdietrich or @meysholdt : could you please check?

cdietrich commented 2 months ago

@iloveeclipse my capacity this month is non existing. is tobias no longer with you?

iloveeclipse commented 2 months ago

@cdietrich : no idea. @tjeske : are you with us ? :-)

tjeske commented 2 months ago

LGTM as far as I can tell. Honestly I am not familiar with the initial architecture idea (probably no one is anymore) but it shouldn't make things worse. If this PR solves your problem I am fine with it.

cdietrich commented 2 months ago

@trancexpress would you be willing to become a contributor?

iloveeclipse commented 2 months ago

@trancexpress would you be willing to become a contributor?

Yes he will :-)

cdietrich commented 2 months ago

i cannot judge on the thread safty of the new singleton. are we fine with it?

iloveeclipse commented 2 months ago

i cannot judge on the thread safty of the new singleton. are we fine with it?

Do you mean XpectTestGlobalState? It is not thread safe. Are tests run in parallel? If so, singleton doesn't work per definition.

trancexpress commented 2 months ago

i cannot judge on the thread safty of the new singleton. are we fine with it?

Its as unsafe as XpectRunner is.

cdietrich commented 2 months ago

thx @trancexpress