This will create a delay without putting the thread to sleep or throwing an error on timeout:
let delayExpectation = XCTestExpectation()
delayExpectation.isInverted = true
wait(for: [delayExpectation], timeout: 5)
Because the expectation is inverted, it will timeout quietly.