Skip to content

Commit f2de70b

Browse files
authored
increase waitForFile test utility timeout (#206)
motivation: on busy systems (such as CI) this could take a while changte: set timeout to 30s which should be plenty enough
1 parent 2e35c0a commit f2de70b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/TSCTestSupport/misc.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ public func withCustomEnv(_ env: [String: String], body: () throws -> Void) thro
8686
/// Waits for a file to appear for around 1 second.
8787
/// Returns true if found, false otherwise.
8888
public func waitForFile(_ path: AbsolutePath) -> Bool {
89-
let endTime = NSDate().timeIntervalSince1970 + 2
89+
// setting timeout for 30s as on busy systems (such as CI) this could take a while
90+
let endTime = NSDate().timeIntervalSince1970 + 30
9091
while NSDate().timeIntervalSince1970 < endTime {
9192
// Sleep for a bit so we don't burn a lot of CPU.
9293
Thread.sleep(forTimeInterval: 0.01)

0 commit comments

Comments
 (0)