Skip to main content
deleted 22 characters in body; edited title
Source Link
Mureinik
  • 315.9k
  • 54
  • 400
  • 405

Does addadding opens configuration in maven surefire plugin effect anything outside the test scope?

I'm working on a user-related service that handles personal information. While writing unit tests with Mockito, I ran into dependency issues with Byte Buddy, which prevented me from using the latest version of Mockito.

As a workaround, I'm using Mockito version 1.10.19. To make the tests run successfully, I added the following configuration to my pom.xml:

 <plugin>     <groupId>org.apache.maven.plugins</groupId>     <artifactId>maven-surefire-plugin</artifactId>     <version>3.2.5</version>     <configuration>     <argLine>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED</argLine>     </configuration>    </plugin> 

Concern

My senior mentioned that since this is a user service dealing with personal data, I need to make sure that the configuration above doesn't:

  • Interfere with anything outside the test scope, or
  • Pose any security risks to the service or user data.

Additional context

I’veI've also tried mocking dependencies manually, but since the service involves JDBI, it’s been challenging to handle. So I’d like clarification on:

  1. Whether it’s safe to continue using Mockito (with this setup).
  2. If there’s a better or safer approach for testing JDBI-based services.
  3. Any useful articles or resources related to testing with Mockito and JDBI.

Does add opens configuration in maven surefire plugin effect anything outside the test scope?

I'm working on a user-related service that handles personal information. While writing unit tests with Mockito, I ran into dependency issues with Byte Buddy, which prevented me from using the latest version of Mockito.

As a workaround, I'm using Mockito version 1.10.19. To make the tests run successfully, I added the following configuration to my pom.xml:

 <plugin>     <groupId>org.apache.maven.plugins</groupId>     <artifactId>maven-surefire-plugin</artifactId>     <version>3.2.5</version>     <configuration>     <argLine>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED</argLine>     </configuration>    </plugin> 

Concern

My senior mentioned that since this is a user service dealing with personal data, I need to make sure that the configuration above doesn't:

  • Interfere with anything outside the test scope, or
  • Pose any security risks to the service or user data.

Additional context

I’ve also tried mocking dependencies manually, but since the service involves JDBI, it’s been challenging to handle. So I’d like clarification on:

  1. Whether it’s safe to continue using Mockito (with this setup).
  2. If there’s a better or safer approach for testing JDBI-based services.
  3. Any useful articles or resources related to testing with Mockito and JDBI.

Does adding opens configuration in maven surefire plugin effect anything outside the test scope?

I'm working on a user-related service that handles personal information. While writing unit tests with Mockito, I ran into dependency issues with Byte Buddy, which prevented me from using the latest version of Mockito.

As a workaround, I'm using Mockito version 1.10.19. To make the tests run successfully, I added the following configuration to my pom.xml:

<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>3.2.5</version> <configuration> <argLine>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED</argLine> </configuration> </plugin> 

Concern

My senior mentioned that since this is a user service dealing with personal data, I need to make sure that the configuration above doesn't:

  • Interfere with anything outside the test scope, or
  • Pose any security risks to the service or user data.

Additional context

I've also tried mocking dependencies manually, but since the service involves JDBI, it’s been challenging to handle. So I’d like clarification on:

  1. Whether it’s safe to continue using Mockito (with this setup).
  2. If there’s a better or safer approach for testing JDBI-based services.
  3. Any useful articles or resources related to testing with Mockito and JDBI.

WorkingI'm working on a user'suser-related service that handles personal information related project,. While writing unit tests with mockito but because of the byte buddyMockito, I ran into dependency issues can't usewith Byte Buddy, which prevented me from using the latest version of mockito hence had to useMockito.

As a workaround, I'm using Mockito version 1.10.19 version, but to run. To make the tests run successfully, I added the following configuration to my pom.xml:

 <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>3.2.5</version> <configuration> <argLine>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED</argLine> </configuration> 
 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>3.2.5</version> <configuration> <argLine>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED</argLine> </configuration> </plugin> 

but myConcern

My senior is sayingmentioned that since it'sthis is a user service and hasdealing with personal data linked to it he wants me, I need to bemake sure that it will not interfere with any thing outside test scope and is not dangerous to service or personal information of user, can you pls help me thisthe configuration above doesn't:

  • Interfere with anything outside the test scope, or
  • Pose any security risks to the service or user data.

Additional context

I’ve also I have tried mocking dependencies myselfmanually, but since itthe service involves jdbi it getting hard for me , so if you can clarify if I should continue using mockitoJDBI, you can also link any related articles for helpit’s been challenging to handle. So I’d like clarification on:

  1. Whether it’s safe to continue using Mockito (with this setup).
  2. If there’s a better or safer approach for testing JDBI-based services.
  3. Any useful articles or resources related to testing with Mockito and JDBI.

Working on a user's personal information related project, writing unit tests with mockito but because of the byte buddy dependency issues can't use latest version of mockito hence had to use 1.10.19 version, but to run tests successfully added

 <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>3.2.5</version> <configuration> <argLine>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED</argLine> </configuration> 

but my senior is saying that since it's user service and has personal data linked to it he wants me to be sure that it will not interfere with any thing outside test scope and is not dangerous to service or personal information of user, can you pls help me this also I have tried mocking dependencies myself but since it involves jdbi it getting hard for me , so if you can clarify if I should continue using mockito, you can also link any related articles for help

I'm working on a user-related service that handles personal information. While writing unit tests with Mockito, I ran into dependency issues with Byte Buddy, which prevented me from using the latest version of Mockito.

As a workaround, I'm using Mockito version 1.10.19. To make the tests run successfully, I added the following configuration to my pom.xml:

 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>3.2.5</version> <configuration> <argLine>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED</argLine> </configuration> </plugin> 

Concern

My senior mentioned that since this is a user service dealing with personal data, I need to make sure that the configuration above doesn't:

  • Interfere with anything outside the test scope, or
  • Pose any security risks to the service or user data.

Additional context

I’ve also tried mocking dependencies manually, but since the service involves JDBI, it’s been challenging to handle. So I’d like clarification on:

  1. Whether it’s safe to continue using Mockito (with this setup).
  2. If there’s a better or safer approach for testing JDBI-based services.
  3. Any useful articles or resources related to testing with Mockito and JDBI.
Source Link

Does add opens configuration in maven surefire plugin effect anything outside the test scope?

Working on a user's personal information related project, writing unit tests with mockito but because of the byte buddy dependency issues can't use latest version of mockito hence had to use 1.10.19 version, but to run tests successfully added

 <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>3.2.5</version> <configuration> <argLine>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED</argLine> </configuration> 

but my senior is saying that since it's user service and has personal data linked to it he wants me to be sure that it will not interfere with any thing outside test scope and is not dangerous to service or personal information of user, can you pls help me this also I have tried mocking dependencies myself but since it involves jdbi it getting hard for me , so if you can clarify if I should continue using mockito, you can also link any related articles for help