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:
@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user