Closed deepeshpatel3434 closed 1 week ago
Are you by chance running the tests as the root user?
yes i was using root user for build
Ok, thanks.
I'll close this as a duplicate of https://github.com/google/guava/issues/7328. If you want to send a PR to skip the test when running as root, you can. But I'd recommend against running tests (or doing much else) as root as the better solution.
Guava Version
Build Failure for guava v33.2.0
Description
I am attempting to build guava v33.2.0 using Maven but encountered issues during the build process. Below are the steps I followed and the errors encountered.
Results :
Failed tests: testCreateParentDirectories_noPermission(com.google.common.io.MoreFilesTest): expected java.io.IOException to be thrown, but nothing was thrown
Tests run: 857833, Failures: 1, Errors: 0, Skipped: 519
[INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for Guava Maven Parent 33.2.0-jre: [INFO] [INFO] Guava Maven Parent ................................. SUCCESS [01:18 min] [INFO] Guava: Google Core Libraries for Java .............. SUCCESS [05:51 min] [INFO] Guava BOM .......................................... SUCCESS [ 29.484 s] [INFO] Guava Testing Library .............................. SUCCESS [02:48 min] [INFO] Guava Unit Tests ................................... FAILURE [11:07 min] [INFO] Guava GWT compatible libs .......................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 24:44 min [INFO] Finished at: 2024-11-19T10:03:20Z [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.7.2:test (default-test) on project guava-tests : There are test failures. [ERROR] [ERROR] Please refer to /root/guava/guava-tests/target/surefire-reports for the individual test results. [ERROR] -> [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/MojoFailureException [ERROR] [ERROR] After correcting the problems,
Please find detailed log in [attachment]([url](logs guava .txt ))
Example
Expected Behavior
build is failing with below mention info [INFO] Guava Unit Tests ................................... FAILURE [11:07 min]
Actual Behavior
Build should succeed.
Packages
No response
Platforms
No response
Checklist
[x] I agree to follow the code of conduct.
[x] I can reproduce the bug with the latest version of Guava available.