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

Refactor TimeBasedDirectoryCleanerConfigTest for macOS vs Linux #556

Conversation

sleberknight
Copy link
Member

Change the concurrent test in TimeBasedDirectoryCleanerConfigTest so
that it uses '>=' instead of '==' on macOS when waiting for number of
deletions and when making assertions about the total delete count. This
accommodates (though certainly doesn't explain) the behavior we see on
macOS in which there are more successful deletions than there are files
created. On Linux (CentOS as well as Ubuntu) we have never seen that
behavior, so for those OSes we retain the strict equality check.

Relates to #143 (which is already closed)

Change the concurrent test in TimeBasedDirectoryCleanerConfigTest so
that it uses '>=' instead of '==' on macOS when waiting for number of
deletions and when making assertions about the total delete count. This
accommodates (though certainly doesn't explain) the behavior we see on
macOS in which there are more successful deletions than there are files
created. On Linux (CentOS as well as Ubuntu) we have never seen that
behavior, so for those OSes we retain the strict equality check.

Relates to #143 (which is already closed)
@sleberknight sleberknight added the code cleanup Fix issues reported by Sonar or any other code analysis tools label May 4, 2021
@sleberknight sleberknight added this to the 0.23.0 milestone May 4, 2021
@sleberknight sleberknight requested a review from chrisrohr May 4, 2021 01:44
@sleberknight sleberknight marked this pull request as draft May 4, 2021 01:47
@sleberknight sleberknight marked this pull request as ready for review May 4, 2021 02:18
@sonarqubecloud
Copy link

sonarqubecloud bot commented May 4, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sleberknight sleberknight merged commit cdb2be9 into master May 4, 2021
@sleberknight sleberknight deleted the 143-TimeBasedDirectoryCleanerConfigTest-add-separate-macOS-conditions branch May 4, 2021 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code cleanup Fix issues reported by Sonar or any other code analysis tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate why TimeBasedDirectoryCleaner counts too many deletes on MacOS
2 participants