Skip to content

Commit

Permalink
Merge pull request #28537 from geoand/#28526
Browse files Browse the repository at this point in the history
Provide a hint for when @QuarkusTest and @QuarkusIntegrationTest are mixed
  • Loading branch information
geoand authored Oct 18, 2022
2 parents 9a9caad + aeb4d75 commit 254095d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ static void doProcessTestInstance(Object testInstance, ExtensionContext context)
ExtensionContext.Store store = root.getStore(ExtensionContext.Namespace.GLOBAL);
QuarkusTestExtensionState state = store.get(QuarkusTestExtensionState.class.getName(),
QuarkusTestExtensionState.class);
Object testResourceManager = state.testResourceManager;
if (!(testResourceManager instanceof TestResourceManager)) {
throw new RuntimeException(
"An unexpected situation occurred while trying to instantiate the testing infrastructure. Have you perhaps mixed @QuarkusTest and @QuarkusIntegrationTest in the same test run?");
}
((TestResourceManager) state.testResourceManager).inject(testInstance);
}

Expand Down

0 comments on commit 254095d

Please sign in to comment.