1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-07 03:50:08 +02:00

🏗 WIP: Run shell commands in parallel

This commit is contained in:
2022-09-28 22:18:16 +02:00
parent 99da328921
commit 4c11fae541

View File

@ -60,4 +60,18 @@ class SystemShellTest: XCTestCase {
wait(for: [expectation], timeout: 5.0)
}
func test_system_processes_run_in_parallel() async {
let expectation = XCTestExpectation(description: #function)
let thing = {
await Shell.quiet("php -r \"usleep(700);\"")
await Shell.quiet("php -r \"usleep(700);\"")
await Shell.quiet("php -r \"usleep(700);\"")
expectation.fulfill()
}
await thing()
wait(for: [expectation], timeout: 1.0)
}
}