Test Cases & Java Compatibility issue fix#158
Test Cases & Java Compatibility issue fix#158pallakartheekreddy merged 5 commits intoSunbird-Lern:release-8.1.0from
Conversation
Co-authored-by: chethann007 <210659053+chethann007@users.noreply.github.com>
Co-authored-by: chethann007 <210659053+chethann007@users.noreply.github.com>
…sues Fix Maven build: resolve PowerMock Java 11 module system incompatibility
fix: resolve PowerMock Java 11 module system incompatibility
|
Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment
|
There was a problem hiding this comment.
I've completed my review and didn't find any issues... but I did find this frog.
.--._.--.
( O O )
/ . . \
.`._______.'.
/( )\
_/ \ \ / / \_
.~ ` \ \ / / ' ~.
{ -. \ V / .- }
_ _`. \ | | | / .'_ _
>_ _} | | | {_ _<
/. - ~ ,_-' .^. `-_, ~ - .\
'-'|/ \|`-`Check out our docs on how you can make Korbit work best for you and your team.
|
d761ca0
into
Sunbird-Lern:release-8.1.0
There was a problem hiding this comment.
Pull Request Overview
This PR configures Java module system compatibility for testing with PowerMock and other reflection-based testing frameworks in a Java 11+ environment. The changes address module encapsulation restrictions by adding JVM --add-opens flags and fixing test configuration issues.
Key changes:
- Added
--add-opensJVM arguments to maven-surefire-plugin across multiple modules to expose internal Java packages for reflection-based testing - Removed hardcoded file path from test configuration and added exception stack trace logging for better debugging
- Added test scope to PowerMock and JUnit dependencies and excluded problematic controller tests from the build
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| service/test/controllers/BaseControllerTest.java | Removed invalid file path, added java.util.concurrent.* to PowerMockIgnore, and improved exception logging |
| service/pom.xml | Added --add-opens JVM arguments for surefire plugin and excluded controller tests that fail during full build |
| notification-sdk/pom.xml | Configured maven-surefire-plugin with --add-opens arguments for Java module system compatibility |
| all-actors/pom.xml | Added test scope to test dependencies and configured maven-surefire-plugin with --add-opens arguments |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-surefire-plugin</artifactId> | ||
| <version>3.2.5</version> |
There was a problem hiding this comment.
The surefire plugin version is hardcoded to 3.2.5 here, while service/pom.xml uses ${surefire.plugin.version} (3.0.0 from parent pom). Consider using the property variable for consistency: <version>${surefire.plugin.version}</version>
| <version>3.2.5</version> | |
| <version>${surefire.plugin.version}</version> |
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-surefire-plugin</artifactId> | ||
| <version>3.2.5</version> |
There was a problem hiding this comment.
The surefire plugin version is hardcoded to 3.2.5 here, while the parent pom defines surefire.plugin.version as 3.0.0. Consider using the property variable for consistency: <version>${surefire.plugin.version}</version>
| <version>3.2.5</version> | |
| <version>${surefire.plugin.version}</version> |



No description provided.