java-sdk icon indicating copy to clipboard operation
java-sdk copied to clipboard

Remove dependencies and tests that are not needed for CA / SSL

Open salaboy opened this issue 6 months ago • 0 comments

Expected Behavior

The SDK shouldn't include test dependencies to test the behavior of other libraries or functionality that is out of the scope from the SDK.

Actual Behavior

This PR:

Added the following dependencies that are not needed and we shouldn't have in the SDK:

<dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcprov-jdk15on</artifactId>
      <version>1.70</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcpkix-jdk15on</artifactId>
      <version>1.70</version>
      <scope>test</scope>
    </dependency>

It also added complex tests in the following Test class:

sdk/src/test/java/io/dapr/utils/NetworkUtilsTest.java

These tests are not necessary here because the SDK is not responsible for checking that the certificates are correctly generated. We should only test and assert that the certificates are set if the correct properties are set.

Also, all the previously existing tests are now adding the channel to an ArrayList, I would love to know the reason for doing that, this should be removed if it is not serving any purpose.

Steps to Reproduce the Problem

Release Note

RELEASE NOTE:

salaboy avatar May 15 '25 07:05 salaboy