Try to fix wait() in ProfileManager tests

In case condition is immediately met.
This commit is contained in:
Davide 2024-11-26 10:33:30 +01:00
parent 8ec6f90077
commit 55dbd5cb84
No known key found for this signature in database
GPG Key ID: A48836171C759F5E
1 changed files with 3 additions and 0 deletions

View File

@ -709,6 +709,9 @@ private extension ProfileManagerTests {
after action: (ProfileManager) async throws -> Void,
until condition: @escaping (ProfileManager) -> Bool
) async throws {
guard !condition(sut) else {
return
}
let exp = expectation(description: description)
var wasMet = false