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

When src/test/wso2mi directory is not available mvn clean install -Ptest gives error instead of skipping the test #3943

Open
ThusharaSampath opened this issue Jan 29, 2025 · 2 comments

Comments

@ThusharaSampath
Copy link

ThusharaSampath commented Jan 29, 2025

Current Limitation

Following is the log output

[INFO] ------------------------------------------------------------------------
[INFO] U N I T - T E S T S
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.096 s
[INFO] Finished at: 2025-01-28T06:40:37Z
[INFO] ------------------------------------------------------------------------
Error:  Failed to execute goal org.wso2.maven:synapse-unit-test-maven-plugin:5.2.75:synapse-unit-test (synapse-unit-test) on project test-less-not-sample: Exception occurred while running test cases: null -> [Help 1]
Error:  
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
Error:  Re-run Maven using the -X switch to enable full debug logging.
Error:  
Error:  For more information about the errors and possible solutions, please read the following articles:
Error:  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Error: Process completed with exit code 1.

Suggested Improvement

Expected behavior

[INFO] ------------------------------------------------------------------------
[INFO] U N I T - T E S T S
[INFO] ------------------------------------------------------------------------
[INFO] Detect 0 Synapse test case files to execute
[INFO] 
[INFO] 
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ HelloWorldService ---
[INFO] Installing /app/app/pom.xml to /m2/repository/wso2/sampleHelloWorld/HelloWorldService/1.0.0/HelloWorldService-1.0.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.576 s
[INFO] Finished at: 2025-01-29T08:39:55Z
[INFO] ------------------------------------------------------------------------

i.e its better to consider this directory not exist and test files not exist equally by handling the dir not found error gracefully

Version

No response

@kalaiyarasiganeshalingam
Copy link
Contributor

Can you check if updating the following dependency to the latest version (5.2.88) causes any issues in your integration project?

<groupId>org.wso2.maven</groupId>
<artifactId>synapse-unit-test-maven-plugin</artifactId>

@kalaiyarasiganeshalingam
Copy link
Contributor

@ThusharaSampath We have fixed the unit test issue. Please note that the fix is now available in the 5.2.90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants