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

bugfix: Use last modified time instead of creation time for detecting orphaned directories #2489

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented Oct 31, 2024

Somehow this was an issue on linux and JDK 17, but not sure why not others.

I also fixed getting stdout to get it redirected to the logger, my previous change did not fully fix it.

@tgodzik tgodzik force-pushed the debug-failing branch 7 times, most recently from dd89b0d to a93804e Compare November 5, 2024 18:11
@tgodzik tgodzik changed the title test: Debug failing tests on linux bugfix: Use last modified time instead of creation time for detecting orphaned directories Nov 5, 2024
… orphaned directories

Somehow this was an issue on linux and JDK 17, but not sure why not others.

I also fixed getting stdout to get it redirected to the logger, my last change did not fully fix it.
@@ -292,7 +292,7 @@ object ClientInfo {
val dirName = clientDir.underlying.getFileName().toString
val attrs =
Files.readAttributes(clientDir.underlying, classOf[BasicFileAttributes])
val isOldDir = attrs.creationTime.toInstant.isBefore(deletionThresholdInstant)
val isOldDir = attrs.lastModifiedTime.toInstant.isBefore(deletionThresholdInstant)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to use last modified and it's possible to check in the tests actually.

@tgodzik tgodzik requested a review from adpi2 November 5, 2024 18:17
@tgodzik tgodzik merged commit e613709 into scalacenter:main Nov 6, 2024
17 checks passed
@tgodzik tgodzik deleted the debug-failing branch November 6, 2024 10:04
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

Successfully merging this pull request may close these issues.

2 participants