test(sftp): wait for all transfers to finish
This commit is contained in:
1 parent
59bcfd92ee
commit
5e19dcc219
1 file changed
+2
-1
@@ -632,7 +632,8 @@ struct SFTPFeatureTests {
|
||||
#expect(await gate.maximumActive(for: "host-0") == limits.1)
|
||||
for _ in 0..<500 {
|
||||
await gate.releaseAll()
|
||||
if coordinator.activeCount == 0 { break }
|
||||
// Admission can still be pending between the last active task and its successor.
|
||||
if coordinator.sftpTransfers.allSatisfy({ $0.state.isFinished }) { break }
|
||||
try await Task.sleep(for: .milliseconds(10))
|
||||
}
|
||||
#expect(coordinator.sftpTransfers.allSatisfy { $0.state == .completed })
|
||||
|
||||
Reference in new issue
Block a user