Skip to content
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

Capture all classloaders loading mutant for roboelectric and quarkus #1067

Merged
merged 5 commits into from Nov 17, 2022

Conversation

hcoles
Copy link
Owner

@hcoles hcoles commented Jul 29, 2022

No description provided.

Henry Coles added 4 commits November 16, 2022 10:24
Quarkus, Roboelectric (and possibly other frameworks) load the class under test in a
classloader that is not set as the context loader when pitest starts.

A previous change got things working with Quarkus, but Roboelectric
complicates things further by persisting the classloaders between tests.
We must therefore keep track of all classloaders used to load a mutated
class, and insert each mutant into all of them.

This would have been complicated in earlier version of pitest by the
possibility that the same JVM might be used to mutate multiple classes.
This would requite the bytes of each class to be stored so that
unmutated class could be restored.

At some point, a change seems to have been made such that only 1 class
is ever mutated per jvm. Experiments to reintroduce multiple class
mutations (inners, lambdas etc) did not result in a performance increase
in sample code bases. 1 class per jvm is therefore now made a guarantee
to allow the code to be much simpler.
We now have an explicit assumption of 1 mutated class per jvm. Allowing
arbritrary mutant groupings may violate this.
@hcoles hcoles changed the title Capture all classloaders loading mutant for roboelectric Capture all classloaders loading mutant for roboelectric and quarkus Nov 17, 2022
@hcoles hcoles merged commit 89c4aec into master Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant