Replacing XtextSmokeTestRunner in JUnit 5 #3039
-
Hi, since generally replacing Unfortunately, I don't understand the entire state machinations that surround
Then the smoke test runner itself will do state machinations in
I don't follow what state is being set to what. It looks like the wrapping The errors I get during the extra smoke test validation look e.g. like this:
That particular error seems to go away if I call What state exactly do I need to set and restore here, prior to the extra validation we have in smoke tests (i.e. the code that runs during Best regards and thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @szarnekow , could you help here? I'm struggling to understand the memento logic. Best regards and thanks, |
Beta Was this translation helpful? Give feedback.
-
OK, I tried to stay as close as possible to the setup/restore logic in To do so, I replaced the If smoke tests are not running (ENV variable for us), delegate to an instance of the original Then, implement an exception handler that does this:
The wrapper essentially looks like this:
With our custom |
Beta Was this translation helpful? Give feedback.
-
I don't know how to do the above without changing the annotation value of |
Beta Was this translation helpful? Give feedback.
OK, I tried to stay as close as possible to the setup/restore logic in
XtextSmokeTestRunner
and that seems to work.To do so, I replaced the
@InjectWith
IInjectorProvider
of all tests used in a smoke test, with anIInjectorProvider
that does the following:If smoke tests are not running (ENV variable for us), delegate to an instance of the original
IInjectorProvider
type.If smoke tests are running, use
InjectorCache
to wrap the originalIInjectorProvider
.Then, implement an exception handler that does this: