-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QuarkusTestExtension#runExtensionMethod() should only deep clone when necessary #10152
Comments
Unfortunately it's not that simple. If for example you have a Now all this stuff is definitely nasty, I don't see any good solution to the problem. |
Yes, of course one of the deeply referenced objects may need cloning. So the cloning algorithm would then first have to check if any of the objects in the graph needs cloning or not, which isn't very nice either... |
Possibly it would help the JUnit team if the Quarkus use case could be explained in detail in the context of junit-team/junit5#201. |
@stuartwdouglas has already chatted with the JUnit team about this, so they are aware of our case |
Unless you will consider implementing a more clever deep cloning algorithm (only cloning if at least one object in the graph needs cloning), I think we can close this issue again. Hopefully the JUnit 5 issue will be addressed in the not too distant future... |
Hopefully we won't have to create a more clever cloning algorithm, but it may come to that at some point... |
Description
QuarkusTestExtension#runExtensionMethod()
appears to do a deep-clone of all arguments of a given test method. If the parameter class is the same in both class loaders (i.e. both loaded it through a common ancestor class loader) this wouldn't be necessary and avoiding the deep-clone would also be desirable because not all objects can be cloned (see #9677).The text was updated successfully, but these errors were encountered: