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

Mvn test failed with TemporaryFolderUsageTest #1705

Open
fubingting opened this issue Mar 11, 2021 · 2 comments
Open

Mvn test failed with TemporaryFolderUsageTest #1705

fubingting opened this issue Mar 11, 2021 · 2 comments

Comments

@fubingting
Copy link

fubingting commented Mar 11, 2021

When I test with mvn test, the error is as follows:

Running org.junit.rules.TemporaryFolderUsageTest
Tests run: 24, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.105 sec <<< FAILURE! - in org.junit.rules.TemporaryFolderUsageTest
newFolderWithGivenFolderThrowsIOExceptionWhenFolderCannotBeCreated(org.junit.rules.TemporaryFolderUsageTest) Time elapsed: 0.012 sec <<< FAILURE!
java.lang.AssertionError: Expected test to throw (an instance of java.io.IOException and exception with message a string containing "could not create a folder with the path 'level1'")

test env:
[email protected]
[email protected]
[email protected]
os:centos

@stefanbirkner
Copy link
Contributor

@fubingting Can you please debug the test and tell us why it does not reach line 216 in TemporaryFolder.java. Is it because one of the conditions lastMkdirsCallSuccessful and file.isDirectory() is true?

@pmcder pmcder mentioned this issue Jul 29, 2021
@fubingting
Copy link
Author

fubingting commented Sep 17, 2021

I found that I was successful in a non-root environment. Does it have anything to do with root permissions? @stefanbirkner

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

No branches or pull requests

3 participants
@stefanbirkner @fubingting and others