Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Another issue comes up in Sling GraphQL Core when it tries to mock classes like Resource Resolver:

Underlying exception : org.mockito.exceptions.base.MockitoException: Could not modify all classes [interface java.io.Closeable, interface java.lang.AutoCloseable, interface org.apache.sling.api.resource.ResourceResolver]

Pax-Exam test failures

at org.apache.sling.graphql.core.schema.RankedSchemaProvidersTest.setup(RankedSchemaProvidersTest.java:54)When I upgrade to the latest Mockito-inline (5.2.0) from 3.5.11 then the instrumentation does work but the Pax IT test all time out because it is unable to lookup Sling services:

Code Block
[INFO] Running org.apache.sling.graphql.core.it.GraphQLScriptEngineIT
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 21.341 s <<< FAILURE! - in org.apache.sling.graphql.core.it.GraphQLScriptEngineIT
[ERROR] org.apache.sling.graphql.core.it.GraphQLScriptEngineIT.testEnginePresent  Time elapsed: 10.114 s  <<< ERROR!
org.ops4j.pax.swissbox.tracker.ServiceLookupException: gave up waiting for service javax.script.ScriptEngineFactory
at org.ops4j.pax.swissbox.tracker.ServiceLookup.getService(ServiceLookup.java:199)

Remediation: Pending

Examples:

...

Outdated Felix Framework bundle

When inspecting the output of Pax-Exam tests the following error can be found java.lang.reflect.InaccessibleObjectException: Unable to make field private static final java.lang.Object java.net.URL.streamHandlerLock accessible: module java.base does not "opens java.net" to unnamed module @6205ec9d


Remediation: update to the latest version of the org.apache.felix.framework.

Failure with OSGi Converter

...