Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

The late walk test sets itself up again when the walk wins the race

Țugui Dragoș24c5c64d55db
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/FileSizeTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/FileSizeTests.swift
index 3776e4b0..68382ee8 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/FileSizeTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/FileSizeTests.swift
@@ -217,8 +217,9 @@ struct FileSizeTests {
return contents
}
while read.value == 0 { await Task.yield() }
- #expect(await FileSize.contents(of: folder, within: 0) == nil)
- guard !isAnswered.withLock({ $0 }) else {
+ // An answer here means the walk ended before this question joined it, so the two were not set up.
+ let impatient = await FileSize.contents(of: folder, within: 0)
+ guard impatient == nil, !isAnswered.withLock({ $0 }) else {
_ = await patient.value
continue
}