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

Fix tests lifecycle instance and methods annotated with AfterAll #26556

Merged
merged 1 commit into from
Jul 5, 2022

Conversation

Sgitario
Copy link
Contributor

@Sgitario Sgitario commented Jul 5, 2022

The issue was not completely fixed in the commit b306d8a.

The problem was that we were clearing out all the outer instances and hence the current class was not matching with the current test instance.

Fix #25812

@Sgitario
Copy link
Contributor Author

Sgitario commented Jul 5, 2022

cc @ivansenic @geoand

@geoand geoand added triage/waiting-for-ci Ready to merge when CI successfully finishes triage/backport? labels Jul 5, 2022
@quarkus-bot

This comment has been minimized.

The issue was not completely fixed in the commit quarkusio@b306d8a. 

The problem was that we were clearing out all the outer instances and hence the current class was not matching with the current test instance.

Fix quarkusio#25812
@geoand geoand merged commit 380092c into quarkusio:main Jul 5, 2022
@quarkus-bot quarkus-bot bot added this to the 2.11 - main milestone Jul 5, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 5, 2022

Milestone is already set for some of the items:

We haven't automatically updated the milestones for these items.

This message is automatically generated by a bot.

@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jul 5, 2022
@Sgitario Sgitario deleted the add_afterall branch July 5, 2022 12:23
@gsmet gsmet modified the milestones: 2.11 - main, 2.10.2.Final Jul 5, 2022
@famod
Copy link
Member

famod commented Jul 6, 2022

I still have to bisect to be sure, but I fear this has broken test isolation of some sort:
Without touching anything else, merely updating to 2.10.2 now fails two of my tests that are still fine when run individually, but not when run after a @QuarkusTest with @Nested (which is the default order when calling mvn test, unfortunately).

@famod
Copy link
Member

famod commented Jul 6, 2022

Confirmed: When I revert this commit in the 2.10 branch then my tests don't fail anymore.

@famod
Copy link
Member

famod commented Jul 6, 2022

AFAICS, the problem is that with the default PER_METHOD junit lifecycle, multiple instances of the outer class are added to outerInstances (one new instance per nested method I suppose, which feels reasonable) and since pop() only happens "after all", it's not enough to drain outerInstances to empty before the next test class is executed.

@geoand
Copy link
Contributor

geoand commented Jul 7, 2022

@Sgitario can you take care of @famod 's comments?

@famod
Copy link
Member

famod commented Jul 7, 2022

A simple fix for that imminent problem is to add outerInstances.clear() to this block:

} else {
actualTestInstance = runningQuarkusApplication.instance(actualTestClass);
}

But it feels weird to leave so many outer instances in the queue when PER_METHOD is active (the default). I think we need to remove an outer instance as soon as the inner method is done (afterEach?).

@ivansenic
Copy link
Contributor

Can confirm that 2.10.2.Final breaks bunch of tests that we have and that use @Nested. 2.10.1.Final and 2.10.0.Final are fine..

@gsmet
Copy link
Member

gsmet commented Jul 7, 2022

@ivansenic can you put together a reproducer? Thanks!

@ivansenic
Copy link
Contributor

@ivansenic can you put together a reproducer? Thanks!

It's quite hard to create a reproducer. When running tests one-by-one, for example in the IDE, it all works.. When running all of them quarkus build then they start failing, not sure why.. Most of the exceptions are NPEs..

We have tests using different profiles.

A list of errors, maybe you find something helpful. Again all of those work when invoked standalone:

[ERROR] Errors: 
[ERROR]   GrpcClientsTest.happyPath:68 NullInsteadOfMock 
Argument passed to when() is null!
Example of correct stubbing:
    doThrow(new RuntimeException()).when(mock).someMethod();
Also, if you use @Mock annotation don't miss openMocks()
[ERROR]   GrpcClientsTest.noExtraMetadata:111 NullInsteadOfMock 
Argument passed to when() is null!
Example of correct stubbing:
    doThrow(new RuntimeException()).when(mock).someMethod();
Also, if you use @Mock annotation don't miss openMocks()
[ERROR]   ReadBridgeServiceTest$GetDocumentTtlInfo.happyPath:998 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   ReadBridgeServiceTest$SelectivityHints.predicateOrderWithExplicitSelectivity:1061 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   QueryExecutorTest$QueryDocs.fullScan » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanDeep(int)[1] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanDeep(int)[2] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanDeep(int)[3] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanFinalPagingState(int)[10] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanFinalPagingState(int)[11] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanFinalPagingState(int)[1] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanFinalPagingState(int)[2] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanFinalPagingState(int)[3] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanFinalPagingState(int)[4] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanFinalPagingState(int)[5] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanFinalPagingState(int)[6] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanFinalPagingState(int)[7] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanFinalPagingState(int)[8] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanFinalPagingState(int)[9] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanPaged(int)[1] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanPaged(int)[2] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanPaged(int)[3] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanPaged(int)[4] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanPartial(int)[1] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanPartial(int)[2] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanPartial(int)[3] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanPartial(int)[4] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanPartial(int)[5] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanPartial(int)[6] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanPartial(int)[7] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.fullScanPartial(int)[8] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.identityDepthValidation » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeByDocKey(int)[10] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeByDocKey(int)[11] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeByDocKey(int)[1] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeByDocKey(int)[2] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeByDocKey(int)[3] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeByDocKey(int)[4] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeByDocKey(int)[5] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeByDocKey(int)[6] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeByDocKey(int)[7] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeByDocKey(int)[8] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeByDocKey(int)[9] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeResultPaginationWithExcludedRows(int)[10] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeResultPaginationWithExcludedRows(int)[11] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeResultPaginationWithExcludedRows(int)[1] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeResultPaginationWithExcludedRows(int)[2] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeResultPaginationWithExcludedRows(int)[3] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeResultPaginationWithExcludedRows(int)[4] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeResultPaginationWithExcludedRows(int)[5] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeResultPaginationWithExcludedRows(int)[6] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeResultPaginationWithExcludedRows(int)[7] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeResultPaginationWithExcludedRows(int)[8] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeResultPaginationWithExcludedRows(int)[9] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeSameRows » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeSubDocuments(int)[10] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeSubDocuments(int)[11] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeSubDocuments(int)[1] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeSubDocuments(int)[2] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeSubDocuments(int)[3] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeSubDocuments(int)[4] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeSubDocuments(int)[5] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeSubDocuments(int)[6] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeSubDocuments(int)[7] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeSubDocuments(int)[8] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.mergeSubDocuments(int)[9] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.populate(int)[10] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.populate(int)[11] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.populate(int)[1] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.populate(int)[2] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.populate(int)[3] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.populate(int)[4] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.populate(int)[5] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.populate(int)[6] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.populate(int)[7] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.populate(int)[8] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.populate(int)[9] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.subDocuments » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.subDocumentsPaged(int)[10] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.subDocumentsPaged(int)[11] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.subDocumentsPaged(int)[1] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.subDocumentsPaged(int)[2] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.subDocumentsPaged(int)[3] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.subDocumentsPaged(int)[4] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.subDocumentsPaged(int)[5] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.subDocumentsPaged(int)[6] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.subDocumentsPaged(int)[7] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.subDocumentsPaged(int)[8] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.subDocumentsPaged(int)[9] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.testExhaustedQueryReExecution » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.testMergeByDocKeyPaged(int)[10] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.testMergeByDocKeyPaged(int)[11] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.testMergeByDocKeyPaged(int)[1] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.testMergeByDocKeyPaged(int)[2] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.testMergeByDocKeyPaged(int)[3] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.testMergeByDocKeyPaged(int)[4] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.testMergeByDocKeyPaged(int)[5] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.testMergeByDocKeyPaged(int)[6] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.testMergeByDocKeyPaged(int)[7] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.testMergeByDocKeyPaged(int)[8] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   QueryExecutorTest$QueryDocs.testMergeByDocKeyPaged(int)[9] » ServiceConfiguration io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
[ERROR]   DocumentTtlQueryBuilderTest$BuildQuery.happyPath:44 » NullPointer Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null
[ERROR]   DocumentTtlQueryBuilderTest$BuildQuery.happyPathAddedColumnsIgnored:57 » NullPointer Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null
[ERROR]   FullSearchQueryBuilderTest$BuildQuery.happyPath:44 » NullPointer Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null
[ERROR]   PopulateSearchQueryBuilderTest$BuildQuery.happyPath:44 » NullPointer Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null
[ERROR]   InMemoryCandidatesFilterTest$BindAndFilter.fixedPath:212 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   InMemoryCandidatesFilterTest$BindAndFilter.globPathMultipleExpressions:285 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   InMemoryCandidatesFilterTest$BindAndFilter.nothingReturned:356 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   InMemoryCandidatesFilterTest$BindAndFilter.nothingReturnedButEvalOnMissing:412 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   InMemoryCandidatesFilterTest$BindAndFilter.testNotPassed:468 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   InMemoryCandidatesFilterTest$PrepareQuery.fixedPath:145 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.reset()" because "this.bridge" is null
[ERROR]   InMemoryCandidatesFilterTest$PrepareQuery.globComplexPath:183 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.reset()" because "this.bridge" is null
[ERROR]   PersistenceCandidatesFilterTest$BindAndFilter.fixedPath:210 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   PersistenceCandidatesFilterTest$BindAndFilter.globPathMultipleExpressions:273 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   PersistenceCandidatesFilterTest$BindAndFilter.nothingReturned:334 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   PersistenceCandidatesFilterTest$PrepareQuery.fixedPath:144 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.reset()" because "this.bridge" is null
[ERROR]   PersistenceCandidatesFilterTest$PrepareQuery.globComplexPath:184 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.reset()" because "this.bridge" is null
[ERROR]   InMemoryDocumentsResolverTest$GetDocuments.complexFilterPath:383 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   InMemoryDocumentsResolverTest$GetDocuments.happyPath:102 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   InMemoryDocumentsResolverTest$GetDocuments.happyPathEvalOnMissing:163 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   InMemoryDocumentsResolverTest$GetDocuments.happyPathMultipleExpressions:226 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   InMemoryDocumentsResolverTest$GetDocuments.multipleDocuments:281 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   InMemoryDocumentsResolverTest$GetDocuments.nothingReturnedFromDataStore:347 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   InMemoryDocumentsResolverTest$GetDocuments.testNotPassed:432 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   OrExpressionDocumentsResolverTest$GetDocuments.inMemoryAndEvaluateOnMissing:955 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   OrExpressionDocumentsResolverTest$GetDocuments.inMemoryAndEvaluateOnMissingNotMatching:1035 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   OrExpressionDocumentsResolverTest$GetDocuments.persistenceAndEvaluateOnMissing:811 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   OrExpressionDocumentsResolverTest$GetDocuments.persistenceAndEvaluateOnMissingNotMatched:886 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   OrExpressionDocumentsResolverTest$GetDocuments.persistenceAndInMemoryConditionMemoryFalse:647 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   OrExpressionDocumentsResolverTest$GetDocuments.persistenceAndInMemoryConditionMemoryTrue:549 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   OrExpressionDocumentsResolverTest$GetDocuments.persistenceAndInMemoryConditionNothingReturned:735 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   OrExpressionDocumentsResolverTest$GetDocuments.persistenceAndInMemoryConditionPersistenceTrue:447 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   OrExpressionDocumentsResolverTest$GetDocuments.twoPersistenceConditions:105 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   OrExpressionDocumentsResolverTest$GetDocuments.twoPersistenceConditionsNothingReturned:372 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   OrExpressionDocumentsResolverTest$GetDocuments.twoPersistenceConditionsOneQueryEmpty:283 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   OrExpressionDocumentsResolverTest$GetDocuments.twoPersistenceConditionsTwoDocuments:191 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   PersistenceDocumentsResolverTest$GetDocuments.complexFilterPath:355 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   PersistenceDocumentsResolverTest$GetDocuments.happyPath:107 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   PersistenceDocumentsResolverTest$GetDocuments.happyPathMultipleExpressions:177 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   PersistenceDocumentsResolverTest$GetDocuments.multipleDocuments:246 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   PersistenceDocumentsResolverTest$GetDocuments.nothingReturnedFromDataStore:316 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   SubDocumentsResolverTest$GetDocuments.complexPathWithMoreRows:188 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   SubDocumentsResolverTest$GetDocuments.happyPath:107 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   SubDocumentsResolverTest$GetDocuments.nothingFound:478 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   SubDocumentsResolverTest$GetDocuments.orConditionNoneTrue:402 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   SubDocumentsResolverTest$GetDocuments.orConditionOneTrue:306 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   AuthorizedTableManagerTest$GetValidCollectionTable.happyPath:97 » NullPointer
[ERROR]   AuthorizedTableManagerTest$GetValidCollectionTables.happyPath:193 » NullPointer
[ERROR]   NamespaceManagerTest$CreateNamespace.happyPath:339 NullInsteadOfMock 
Argument passed to when() is null!
Example of correct stubbing:
    doThrow(new RuntimeException()).when(mock).someMethod();
Also, if you use @Mock annotation don't miss openMocks()
[ERROR]   NamespaceManagerTest$DropNamespace.happyPath:378 NullInsteadOfMock 
Argument passed to when() is null!
Example of correct stubbing:
    doThrow(new RuntimeException()).when(mock).someMethod();
Also, if you use @Mock annotation don't miss openMocks()
[ERROR]   NamespaceManagerTest$DropNamespace.notExisting:443 NullInsteadOfMock 
Argument passed to when() is null!
Example of correct stubbing:
    doThrow(new RuntimeException()).when(mock).someMethod();
Also, if you use @Mock annotation don't miss openMocks()
[ERROR]   NamespaceManagerTest$GetNamespace.happyPath:95 NullInsteadOfMock 
Argument passed to when() is null!
Example of correct stubbing:
    doThrow(new RuntimeException()).when(mock).someMethod();
Also, if you use @Mock annotation don't miss openMocks()
[ERROR]   NamespaceManagerTest$GetNamespace.notAuthorized:182 NullInsteadOfMock 
Argument passed to when() is null!
Example of correct stubbing:
    doThrow(new RuntimeException()).when(mock).someMethod();
Also, if you use @Mock annotation don't miss openMocks()
[ERROR]   NamespaceManagerTest$GetNamespace.notExisting:137 NullInsteadOfMock 
Argument passed to when() is null!
Example of correct stubbing:
    doThrow(new RuntimeException()).when(mock).someMethod();
Also, if you use @Mock annotation don't miss openMocks()
[ERROR]   NamespaceManagerTest$GetNamespaces.happyPath:233 NullInsteadOfMock 
Argument passed to when() is null!
Example of correct stubbing:
    doThrow(new RuntimeException()).when(mock).someMethod();
Also, if you use @Mock annotation don't miss openMocks()
[ERROR]   NamespaceManagerTest$GetNamespaces.noneExists:292 NullInsteadOfMock 
Argument passed to when() is null!
Example of correct stubbing:
    doThrow(new RuntimeException()).when(mock).someMethod();
Also, if you use @Mock annotation don't miss openMocks()
[ERROR]   TableManagerTest$CreateCollectionTable.happyPath:403 NullInsteadOfMock 
Argument passed to when() is null!
Example of correct stubbing:
    doThrow(new RuntimeException()).when(mock).someMethod();
Also, if you use @Mock annotation don't miss openMocks()
[ERROR]   TableManagerTest$CreateCollectionTable.invalidName:436 NullInsteadOfMock 
Argument(s) passed is null!
Examples of correct verifications:
    verifyNoMoreInteractions(mockOne, mockTwo);
    verifyNoInteractions(mockOne, mockTwo);
[ERROR]   TableManagerTest$DropCollectionTable.happyPath:458 NullInsteadOfMock 
Argument passed to when() is null!
Example of correct stubbing:
    doThrow(new RuntimeException()).when(mock).someMethod();
Also, if you use @Mock annotation don't miss openMocks()
[ERROR]   TableManagerTest$EnsureValidCollectionTable.alreadyExists:290 NullInsteadOfMock 
Argument passed to when() is null!
Example of correct stubbing:
    doThrow(new RuntimeException()).when(mock).someMethod();
Also, if you use @Mock annotation don't miss openMocks()
[ERROR]   TableManagerTest$EnsureValidCollectionTable.created:337 NullInsteadOfMock 
Argument passed to when() is null!
Example of correct stubbing:
    doThrow(new RuntimeException()).when(mock).someMethod();
Also, if you use @Mock annotation don't miss openMocks()
[ERROR]   TableManagerTest$GetValidCollectionTable.happyPath:109 NullInsteadOfMock 
Argument passed to when() is null!
Example of correct stubbing:
    doThrow(new RuntimeException()).when(mock).someMethod();
Also, if you use @Mock annotation don't miss openMocks()
[ERROR]   TableManagerTest$GetValidCollectionTable.noKeyspace:212 NullInsteadOfMock 
Argument passed to when() is null!
Example of correct stubbing:
    doThrow(new RuntimeException()).when(mock).someMethod();
Also, if you use @Mock annotation don't miss openMocks()
[ERROR]   TableManagerTest$GetValidCollectionTable.noTable:181 NullInsteadOfMock 
Argument passed to when() is null!
Example of correct stubbing:
    doThrow(new RuntimeException()).when(mock).someMethod();
Also, if you use @Mock annotation don't miss openMocks()
[ERROR]   TableManagerTest$GetValidCollectionTable.notValid:144 NullInsteadOfMock 
Argument passed to when() is null!
Example of correct stubbing:
    doThrow(new RuntimeException()).when(mock).someMethod();
Also, if you use @Mock annotation don't miss openMocks()
[ERROR]   TableManagerTest$GetValidCollectionTables.happyPath:252 NullInsteadOfMock 
Argument passed to when() is null!
Example of correct stubbing:
    doThrow(new RuntimeException()).when(mock).someMethod();
Also, if you use @Mock annotation don't miss openMocks()
[ERROR]   WriteBridgeServiceTest$DeleteDeadLeaves.happyPath:1224 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   WriteBridgeServiceTest$DeleteDocument.deleteSubPath:1173 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   WriteBridgeServiceTest$DeleteDocument.happyPath:1135 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   WriteBridgeServiceTest$PatchDocument.happyPath:631 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   WriteBridgeServiceTest$PatchDocument.happyPathSubDocument:932 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   WriteBridgeServiceTest$PatchDocument.happyPathWithTtl:780 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   WriteBridgeServiceTest$UpdateDocument.happyPath:281 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   WriteBridgeServiceTest$UpdateDocument.happyPathWithTtl:377 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   WriteBridgeServiceTest$UpdateDocument.updateSubPath:476 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   WriteBridgeServiceTest$WithDifferentConsistency.happyPath:1339 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   WriteBridgeServiceTest$WriteDocument.happyPath:114 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[ERROR]   WriteBridgeServiceTest$WriteDocument.happyPathWithTtl:196 » NullPointer Cannot invoke "io.stargate.sgv2.docsapi.bridge.ValidatingStargateBridge.withQuery(String, io.stargate.bridge.proto.QueryOuterClass$Value[])" because "this.bridge" is null
[INFO] 
[ERROR] Tests run: 787, Failures: 0, Errors: 178, Skipped: 0

@famod
Copy link
Member

famod commented Jul 7, 2022

@ivansenic

The following hack works around the problem:

import java.lang.reflect.Field;
import java.util.Collection;

import org.junit.jupiter.api.extension.AfterAllCallback;
import org.junit.jupiter.api.extension.ExtensionContext;

import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.QuarkusTestExtension;

/**
 * Workaround for https://github.com/quarkusio/quarkus/pull/26556#issuecomment-1176798851 until proper fix is available.
 */
// This is not a QuarkusTestAfterAllCallback because the code must not run in a "Quarkus Runtime ClassLoader",
// we need the system CL (regular surefire) or deployment CL (continuous testing) instead.
public class QuarkusTestOuterInstancesWorkaround implements AfterAllCallback {

    @Override
    public void afterAll(final ExtensionContext context) throws Exception {
        // after a toplevel QuarkusTest is done, make sure to clear outerInstances collection
        // rationale: it might contain @Nested tests and will thus leak instances (as of 2.10.2.Final)
        // note: checking for actual @Nested classes is not strictly required
        if (context.getElement()
                .filter(e -> e.isAnnotationPresent(QuarkusTest.class))
                .isPresent()) {
            try {
                final Field field = QuarkusTestExtension.class.getDeclaredField("outerInstances");
                field.setAccessible(true);
                ((Collection<?>) field.get(null)).clear();
            } catch (final ReflectiveOperationException e) {
                throw new IllegalStateException(e);
            }
        }
    }
}

(to be registered via META-INF/services/org.junit.jupiter.api.extension.Extension)

Btw, in my case I'm also getting mock issues. I won't have much time to create a reproducer.

@Sgitario
Copy link
Contributor Author

Sgitario commented Jul 8, 2022

A simple fix for that imminent problem is to add outerInstances.clear() to this block:

} else {
actualTestInstance = runningQuarkusApplication.instance(actualTestClass);
}

But it feels weird to leave so many outer instances in the queue when PER_METHOD is active (the default). I think we need to remove an outer instance as soon as the inner method is done (afterEach?).

This really makes a lot of sense. Will try to address this issue once I'm back from my sick leave days.

@famod
Copy link
Member

famod commented Jul 8, 2022

@Sgitario oh, get well soon! Do you have an idea when that will be? No pressure, I'm just asking in case I find some time over the weekend.

I tried to reproduce my problem by extending integration-tests/injectmock but haven't been successful yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QuarkusTestExtension fails to run @AfterAll with nested test classes and per-class test instance lifecycle
5 participants