Skip to content

Commit

Permalink
Provide a hint for when @QuarkusTest and @QuarkusIntegrationTest are …
Browse files Browse the repository at this point in the history
…mixed

Closes: quarkusio#28526

Co-authored-by: Falko Modler <[email protected]>
  • Loading branch information
geoand and famod committed Oct 14, 2022
1 parent 5ff8334 commit aeb4d75
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 aeb4d75

Please sign in to comment.