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.

Don't wait for a test's program on another thread

Țugui Dragoș8de265ccecb0
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/TrashServiceTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/TrashServiceTests.swift
index d0d42111..1bd9660a 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/TrashServiceTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/TrashServiceTests.swift
@@ -346,7 +346,8 @@ struct TrashServiceTests {
stopJobs: { jobs, _ in
guard !jobs.isEmpty else { return [] }
agent.terminate()
- agent.waitUntilExit()
+ // Not `waitUntilExit`: on another thread than the one that started the program it can wait forever.
+ _ = await ProcessEnds.ends(agent.processIdentifier, within: 60)
return jobs
},
moveThroughHelper: { urls in