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

jf mvn test shows "failure" even when all tests are passed #2697

Open
daykjfrog opened this issue Sep 17, 2024 · 0 comments
Open

jf mvn test shows "failure" even when all tests are passed #2697

daykjfrog opened this issue Sep 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@daykjfrog
Copy link

daykjfrog commented Sep 17, 2024

Describe the bug

When using ‘jf mvn test’, the CLI output shows “failure” even if all tests are passed:

Current behavior

base ❯ mvn test
[WARNING]
[WARNING] Some problems were encountered while building the effective settings
[WARNING] Unrecognised tag: 'updatePolicy' (position: START_TAG seen ...\n... @56:15) @ /Users/dayk/.m2/settings.xml, line 56, column 15
[WARNING]
[INFO] Scanning for projects...
Downloading from snapshots: https://xxx.jfrog.io/artifactory/dayk-libs-snapshot/org/jfrog/test/multi/4.0-SNAPSHOT/maven-metadata.xml
...
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running artifactory.test.AppTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.012 s -- in artifactory.test.AppTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] ------------------------< org.jfrog.test:multi >------------------------
[INFO] Building Simple Multi Modules Build 3.7-SNAPSHOT [3/3]
[INFO] from pom.xml
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Multi 1 4.0-SNAPSHOT ............................... SUCCESS [ 17.883 s]
[INFO] Multi 2 3.7-SNAPSHOT ............................... SUCCESS [ 1.762 s]
[INFO] Simple Multi Modules Build 3.7-SNAPSHOT ............ SUCCESS [ 0.000 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.165 s
[INFO] Finished at: 2024-09-10T09:10:02-07:00
[INFO] ------------------------------------------------------------------------
Doesn’t have the same result as when using jf mvn test

9:14
Using jf mvn test, it shows build success but at the end, it shows as “failure”
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger -
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------< org.jfrog.test:multi >------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Building Simple Multi Modules Build 3.7-SNAPSHOT [3/3]
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --------------------------------[ pom ]---------------------------------
[main] INFO org.jfrog.build.extractor.maven.BuildDeploymentHelper - Artifactory Build Info Recorder: Saving Build Info to '/Users/dayk/.m2/project-examples/maven-examples/maven-example/target/build-info.json'
[main] INFO org.jfrog.build.extractor.maven.BuildDeploymentHelper - Artifactory Build Info Recorder: deploy artifacts set to false, artifacts will not be deployed...
[main] INFO org.jfrog.build.extractor.maven.BuildDeploymentHelper - Artifactory Build Info Recorder: publish build info set to false, build info will not be published...
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Reactor Summary:
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger -
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Multi 1 4.0-SNAPSHOT ............................... SUCCESS [ 2.219 s]
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Multi 2 3.7-SNAPSHOT ............................... SUCCESS [ 0.227 s]
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Simple Multi Modules Build 3.7-SNAPSHOT ............ SUCCESS [ 0.001 s]
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD SUCCESS
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time: 3.914 s
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2024-09-10T09:11:41-07:00
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
{
"status": "failure",
"totals": {
"success": 0,
"failure": 3
}
}

Note the JSON output at the end.

Reproduction steps

No response

Expected behavior

Need to remove the JFCLI status object from the response since it is not relevant in this case since there were no Uploads or Downloads.

JFrog CLI version

2.67.0

Operating system type and version

Any

JFrog Artifactory version

No response

JFrog Xray version

No response

@daykjfrog daykjfrog added the bug Something isn't working label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant