Skip to content

Commit

Permalink
Merge pull request #22359 from famod/test-tccl-reset
Browse files Browse the repository at this point in the history
Make sure to reset TCCL if initTestState() fails
  • Loading branch information
famod authored Dec 20, 2021
2 parents 16f4395 + a9e3da1 commit cc118fd
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -703,9 +703,12 @@ public <T> T interceptTestClassConstructor(Invocation<T> invocation,
old = setCCL(runningQuarkusApplication.getClassLoader());
}

initTestState(extensionContext, state);
if (old != null) {
setCCL(old);
try {
initTestState(extensionContext, state);
} finally {
if (old != null) {
setCCL(old);
}
}
return result;
}
Expand Down

0 comments on commit cc118fd

Please sign in to comment.