java ci should capture full stack traces in the test run logs
See original GitHub issueTo see the full stack trace of the errors, re-run Maven with the -e switch.
It would be nice if the CI pipelines were configured to run mvn.cmd with -e for full stack traces in the output logs:
2019-10-01T22:36:06.1361408Z org.spockframework.runtime.WrongExceptionThrownError: Expected exception of type 'com.azure.storage.blob.models.StorageException', but got 'java.lang.IllegalStateException'
2019-10-01T22:36:06.1367760Z at com.azure.storage.blob.specialized.BlockBlobAPITest.Buffered upload network error(BlockBlobAPITest.groovy:1073)
2019-10-01T22:36:06.2114125Z Caused by: java.lang.IllegalStateException: BufferedUpload thread interrupted. Thread:16
2019-10-01T22:36:06.2120190Z
2019-10-01T22:36:11.6082231Z [ERROR] Failures:
2019-10-01T22:36:11.6083914Z [ERROR] BlockBlobAPITest.Buffered upload network error:1073->SpecInternals.thrownImpl:67->SpecInternals.checkExceptionThrown:80 Expected exception of type 'com.azure.storage.blob.models.StorageException', but got 'java.lang.IllegalStateException'
2019-10-01T22:36:11.6084928Z [ERROR] Tests run: 1062, Failures: 1, Errors: 0, Skipped: 16
2019-10-01T22:36:46.3978058Z [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3:test (default-test) on project azure-storage-blob: There are test failures.
2019-10-01T22:36:46.3984044Z [ERROR]
2019-10-01T22:36:46.3985221Z [ERROR] Please refer to D:\a\1\s\sdk\storage\azure-storage-blob\target\surefire-reports for the individual test results.
2019-10-01T22:36:46.3986159Z [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
2019-10-01T22:36:46.3986755Z [ERROR] -> [Help 1]
2019-10-01T22:36:46.3987238Z [ERROR]
2019-10-01T22:36:46.3987792Z [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
2019-10-01T22:36:46.3988288Z [ERROR] Re-run Maven using the -X switch to enable full debug logging.
2019-10-01T22:36:46.3989328Z [ERROR]
2019-10-01T22:36:46.3989895Z [ERROR] For more information about the errors and possible solutions, please read the following articles:
2019-10-01T22:36:46.3990566Z [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
2019-10-01T22:36:46.3991095Z [ERROR]
2019-10-01T22:36:46.3991687Z [ERROR] After correcting the problems, you can resume the build with the command
2019-10-01T22:36:46.3992224Z [ERROR] mvn <goals> -rf :azure-storage-blob
2019-10-01T22:36:46.5514746Z The process 'C:\ProgramData\chocolatey\lib\maven\apache-maven-3.6.1\bin\mvn.cmd' failed with exit code 1
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How do you write a full stack trace to the log?
If you using Java 8 you can do the following: LOGGER.error("Caught exception while methodX. Please investigate: " + exception + Arrays.asList(exception.
Read more >Run Java Tests With Maven Silently (Only Log on Failure)
When running our entire test suite locally or on a CI server (e.g., ... the log output of passing tests, we might also...
Read more >How to get stacktraces from logs or emails into your Java IDE
Java /Spring courses & guideshttps://www.marcobehler.com▻ ... Obviously you will 'encounter' stack traces first in log files, or emails.
Read more >Analyze a stack trace - Android Developers
While your app is running in debug mode on a connected device, Android Studio prints and highlights stack traces in the Logcat view,...
Read more >How to Collect, Customize, and Standardize Java Logs
In JSON, log lines wrap into a field to make up a single log event that you can later parse for the full...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yep – this is something that we can do. I was thinking of trying to standardize where we put diagnostic logs like this, so if we have a path where files can go that guarantees that those files will be lifted into an artifact for each job leg.
We need to be a little bit careful about accidentally leaking credentials - we try to be sensible but you never know what crazy stuff some tools put in their log files.
Going to close this since it is capturing the detail in the test results, which are then published into pipelines. Let me know if this is not what you are seeing.