confluentinc / confluentinc/ide-sidecar
`make quarkus-test` has 8 failures
Open
@Cerchie is already working on this.
Since Jun 3, 2025.
bug
cleanup
- Dominant language
- Java
- Stars
- 5
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
make quarkus-test, the "continuous testing mode of Quarkus", has 8 failures.
Some look to be issues with either finding or loading canned resource files:
2025-03-27 11:43:39,350 ERROR [io.qua.test] (Test runner thread) Test BasicCredentialsTest#shouldSerializeAndDeserialize() failed
[Error Occurred After Shutdown]: org.opentest4j.AssertionFailedError: unable to read value from resource file credentials/basic_credentials.json
at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:42)
at org.junit.jupiter.api.Assertions.fail(Assertions.java:150)
at io.confluent.idesidecar.restapi.credentials.RedactedTestBase.readValueFromResource(RedactedTestBase.java:37)
at io.confluent.idesidecar.restapi.credentials.RedactedTestBase.assertSerializeAndDeserialize(RedactedTestBase.java:17)
at io.confluent.idesidecar.restapi.credentials.BasicCredentialsTest.shouldSerializeAndDeserialize(BasicCredentialsTest.java:19)
Caused by: com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Could not resolve type id 'io.confluent.idesidecar.restapi.credentials.BasicCredentials' as a subtype of `io.confluent.idesidecar.restapi.credentials.BasicCredentials`: Not a subtype
at [Source: UNKNOWN; byte offset: #UNKNOWN]
at com.fasterxml.jackson.databind.exc.InvalidTypeIdException.from(InvalidTypeIdException.java:43)
at com.fasterxml.jackson.databind.DeserializationContext.invalidTypeIdException(DeserializationContext.java:2040)
at com.fasterxml.jackson.databind.DatabindContext._throwNotASubtype(DatabindContext.java:290)
at com.fasterxml.jackson.databind.DatabindContext.resolveAndValidateSubType(DatabindContext.java:251)
at com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver._typeFromId(ClassNameIdResolver.java:75)
at com.fasterxml.jackson.databind.jsontype.impl.ClassNameIdResolver.typeFromId(ClassNameIdResolver.java:69)
at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._findDeserializer(TypeDeserializerBase.java:159)
at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:151)
at com.fasterxml.jackson.databind.jsontype.impl.AsDeductionTypeDeserializer.deserializeTypedFromObject(AsDeductionTypeDeserializer.java:155)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeWithType(BeanDeserializerBase.java:1380)
at com.fasterxml.jackson.databind.deser.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:74)
at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:342)
at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:4881)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3035)
at com.fasterxml.jackson.databind.ObjectMapper.treeToValue(ObjectMapper.java:3499)
at io.confluent.idesidecar.restapi.credentials.RedactedTestBase.readValueFromResource(RedactedTestBase.java:35)
... 2 more
And others look to be Mockito vs classloaders related:
2025-03-27 11:43:39,350 ERROR [io.qua.test] (Test runner thread) Test ConnectionStateTest#shouldNotifyListenerWithChangeInStatusToSuccess() failed
[Error Occurred After Shutdown]: org.mockito.exceptions.base.MockitoException:
Mockito cannot mock this class: interface io.confluent.idesidecar.restapi.connections.ConnectionState$StateChangedListener.
If you're not sure why you're getting this error, please open an issue on GitHub.
Java : 21
JVM vendor name : GraalVM Community
JVM vendor version : 21.0.2+13-jvmci-23.1-b30
JVM name : OpenJDK 64-Bit Server VM
JVM version : 21.0.2+13-jvmci-23.1-b30
JVM info : mixed mode, sharing
OS name : Mac OS X
OS version : 15.3.2
You are seeing this disclaimer because Mockito is configured to create inlined mocks.
You can learn about inline mocks and their limitations under item #39 of the Mockito class javadoc.
Underlying exception : org.mockito.exceptions.base.MockitoException:
Cannot create mock for interface io.confluent.idesidecar.restapi.connections.ConnectionState$StateChangedListener
The type is not public and its mock class is loaded by a different class loader.
This can have multiple reasons:
- You are mocking a class with additional interfaces of another class loader
- Mockito is loaded by a different class loader than the mocked type (e.g. with OSGi)
- The thread's context class loader is different than the mock's class loader
at io.confluent.idesidecar.restapi.connections.ConnectionStateTest.beforeEach(ConnectionStateTest.java:65)
Caused by: org.mockito.exceptions.base.MockitoException:
Cannot create mock for interface io.confluent.idesidecar.restapi.connections.ConnectionState$StateChangedListener
The type is not public and its mock class is loaded by a different class loader.
This can have multiple reasons:
- You are mocking a class with additional interfaces of another class loader
- Mockito is loaded by a different class loader than the mocked type (e.g. with OSGi)
- The thread's context class loader is different than the mock's class loader
at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:168)
at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:399)
at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:190)
at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:410)
at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:168)
at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:399)
at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:190)
at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:410)
... 1 more
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.