vaadin / observability-kit

Other
5 stars 2 forks source link

Snapshots builds are failing due to missing ByteBuddy dependency #209

Closed heruan closed 1 year ago

heruan commented 1 year ago

Snapshots builds are currently failing with this error:

com.vaadin.extension.InstrumentationHelperTest
    InstrumentationHelperTest
      org.mockito.exceptions.base.MockitoException: 
      Mockito cannot mock this class: class io.opentelemetry.sdk.trace.SdkTracerProvider.
      Can not mock final classes with the following settings :
       - explicit serialization (e.g. withSettings().serializable())
       - extra interfaces (e.g. withSettings().extraInterfaces(...))

This is probably caused by Flow dropping the ByteBuddy dependency in: https://github.com/vaadin/flow/commit/c6d8a5cd6497d1b8a3a84abd50ab66ae37a8afaf

Adding the dependency to the agent module could fix the issue:

<dependency>
    <groupId>net.bytebuddy</groupId>
    <artifactId>byte-buddy</artifactId>
    <version>1.14.1</version>
    <scope>test</scope>
</dependency>

BTW, the agent module uses an old mockito-inline, that can perhaps be upgraded.