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

Tests failing on examples folder #1111

Open
rochabr opened this issue Aug 26, 2024 · 1 comment
Open

Tests failing on examples folder #1111

rochabr opened this issue Aug 26, 2024 · 1 comment
Labels
kind/bug Something isn't working

Comments

@rochabr
Copy link

rochabr commented Aug 26, 2024

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

@rochabr rochabr added the kind/bug Something isn't working label Aug 26, 2024
@artur-ciocanu
Copy link
Contributor

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

  • Install SDKMan - Dapr Java SDK relies on SDKMan for its development, to make sure we use the right version on JDK
  • Use SDKMan to setup local env - once you have SDKMan you can executed $ sdkman env to make sure the right version of JDK is installed and added to the PATH
  • Use Maven Wrapper - Dapr Java SDK repo uses Maven Wrapper. Could you try using $ ./mvnw clean install instead of $ mvn install.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants