dapr / java-sdk

Dapr SDK for Java
Apache License 2.0
258 stars 205 forks source link

Tests failing on examples folder #1111

Open rochabr opened 2 weeks ago

rochabr commented 2 weeks ago

Expected Behavior

Tests should run and pass.

Actual Behavior

After running mvn install the following exceptions occur:

[ERROR] Failures: 
[ERROR]   DaprClientBuilderTest.blankContentTypeInObjectSerializer:61 Unexpected exception type thrown ==> expected: <java.lang.IllegalArgumentException> but was: <java.lang.IllegalStateException>
[ERROR]   DaprClientBuilderTest.buildWithOverrideSidecarIP:50 expected: <true> but was: <false>
.
.
.
[ERROR]   DaprRuntimeTest.invokeHappyCase:149 » IllegalState Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null)
[ERROR]   DaprRuntimeTest.pubSubHappyCase:80 » IllegalState Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null)
[ERROR]   DaprRuntimeTest.subscribeCallbackException:236 » IllegalState Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null)
[ERROR]   DaprRuntimeTest.subscribeUnknownTopic:269 » IllegalState Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null)
[INFO] 
[ERROR] Tests run: 292, Failures: 2, Errors: 141, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] dapr-sdk-parent 1.13.0-SNAPSHOT .................... SUCCESS [  2.267 s]
[INFO] dapr-sdk-autogen 1.13.0-SNAPSHOT ................... SUCCESS [ 13.359 s]
[INFO] dapr-sdk 1.13.0-SNAPSHOT ........................... FAILURE [ 16.788 s]
[INFO] dapr-sdk-actors 1.13.0-SNAPSHOT .................... SKIPPED
[INFO] dapr-sdk-workflows 0.13.0-SNAPSHOT ................. SKIPPED
[INFO] dapr-sdk-springboot 1.13.0-SNAPSHOT ................ SKIPPED
[INFO] dapr-sdk-examples 1.13.0-SNAPSHOT .................. SKIPPED
[INFO] testcontainers-dapr 0.13.0-SNAPSHOT ................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

Steps to Reproduce the Problem

1 - Follow the tutorial on https://github.com/dapr/java-sdk/tree/master/examples 2 - After running the mvn install step see the exceptions

Release Note

Dapr CLI version: 1.14.1 Dapr Runtime version: 1.14.1 Java version: 22.0.2 Maven version: 3.9.8

artur-ciocanu commented 2 weeks ago

@rochabr thanks a lot for raising this issue. I was wondering you could try a few things:

If after all these steps you will still run into issues then we will have to dig deeper. If everything will work out, I will make sure to adjust the docs and add references to SDKMan and Maven Wrapper.

CC: @artursouza @cicoyle