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

Test failed even though the module only contains an empty directory #1365

Open
cheehonglee-lazada opened this issue Nov 21, 2024 · 0 comments

Comments

@cheehonglee-lazada
Copy link

cheehonglee-lazada commented Nov 21, 2024

Currently, the org.pitest.maven.NonEmptyProjectCheck#exists method only checks if there exists such a File (in JDK sense). However, there is an edge case where the File is just an empty directory. In this case, pitest will treat module as non empty, and thus fail the test.

My suggestion is to recursively check the directory until there is an actual file.

Relevant code portion:
image

Relevant Issue:
pitest fails to execute on projects that don't have test classes #314

@cheehonglee-lazada cheehonglee-lazada changed the title Test failed even though the module only contains a empty directory Test failed even though the module only contains an empty directory Nov 21, 2024
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

1 participant