Skip to content

Conversation

@geoand
Copy link
Contributor

@geoand geoand commented Mar 20, 2020

Currently TestFactory can't be used with DynamicTest for 2 reasons:

  • The methods are not intercepted
  • The is no handling for the different CLs

This PR introduces the necessary interception and ClassLoader handling to get DynamicTest to work. However this requires user code to use QuarkusDynamicTest instead of JUnit's DynamicTest and to not return specify DynamicTest as the method signature (due to JUnit 5 expecting DynamicTest to be loaded from the regular CL).

Fixes: #8004

@geoand
Copy link
Contributor Author

geoand commented Mar 22, 2020

@stuartwdouglas what you do you think about this?
I can't say I'm excited about it, but I didn't come up with anything better unfortunately...

@stuartwdouglas
Copy link
Collaborator

Lets see if #8066 passes CI

@geoand
Copy link
Contributor Author

geoand commented Mar 23, 2020

Oh nice! I keep on forgetting about the parentFirst ClassLoader.

@geoand geoand closed this Mar 23, 2020
@gastaldi gastaldi deleted the #8004 branch March 23, 2020 12:31
@gsmet gsmet added triage/invalid This doesn't seem right and removed triage/backport? labels Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/testing triage/invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: @Inject mock service in QuarkusTest is null during JUnit @TestFactory execution in Quarkus 1.3.0.Final

4 participants