Commit b4391ed80f
Verified · cmc
Layout: unified · split
gitbayTests/AdminRepoTests.swift +5 −2
| @@ -75,7 +75,8 @@ struct AdminRepoTests { | ||
| 75 | 75 | @MainActor |
| 76 | 76 | struct AdminRepoDeleteTests { |
| 77 | 77 | |
| 78 | @Test func aDeleteWhoseRetryFindsNothingIsDoneAndAnnounced() async throws { | |
| 78 | @Test(.timeLimit(.minutes(1))) | |
| 79 | func aDeleteWhoseRetryFindsNothingIsDoneAndAnnounced() async throws { | |
| 79 | 80 | let (client, stub) = try makeClient() |
| 80 | 81 | stub.enqueue(.init(status: 200, json: listJSON, match: "argv=list")) |
| 81 | 82 | stub.enqueue(.init(status: 500, json: #"{"protocol_version":1,"error":"cleanup failed","exit_code":1}"#, match: "cmd")) |
| @@ -86,7 +87,9 @@ struct AdminRepoDeleteTests { | ||
| 86 | 87 | let repo = try #require(model.list.state.value?.first) |
| 87 | 88 | let announced = NotificationCenter.default.notifications(named: .gitbayRepositoryChanged) |
| 88 | 89 | |
| 89 | async let first = announced.first { _ in true } | |
| 90 | // Suites run in parallel and post the same notification for other | |
| 91 | // repos, so wait for this one. | |
| 92 | async let first = announced.first { $0.object as? String == "sim/app" } | |
| 90 | 93 | await model.perform(.delete, on: repo) |
| 91 | 94 | |
| 92 | 95 | #expect(model.actionError == nil) |