Commit b4391ed80f

b4391ed80f932f30dc3c9c30f26f73fd3aa3b95b

parent: 4ac9bff752

Verified · cmc

cmc <hello@cleberg.net> · 2026-11-09 00:28 UTC

Match the announced repo in the admin delete test

Parallel suites post .gitbayRepositoryChanged for other repos, so
taking the first notification failed under full-suite load. Wait for
sim/app, with a one-minute limit.

Layout: unified · split

gitbayTests/AdminRepoTests.swift +5 −2
@@ -75,7 +75,8 @@ struct AdminRepoTests {
7575@MainActor
7676struct AdminRepoDeleteTests {
7777
78 @Test func aDeleteWhoseRetryFindsNothingIsDoneAndAnnounced() async throws {
78 @Test(.timeLimit(.minutes(1)))
79 func aDeleteWhoseRetryFindsNothingIsDoneAndAnnounced() async throws {
7980 let (client, stub) = try makeClient()
8081 stub.enqueue(.init(status: 200, json: listJSON, match: "argv=list"))
8182 stub.enqueue(.init(status: 500, json: #"{"protocol_version":1,"error":"cleanup failed","exit_code":1}"#, match: "cmd"))
@@ -86,7 +87,9 @@ struct AdminRepoDeleteTests {
8687 let repo = try #require(model.list.state.value?.first)
8788 let announced = NotificationCenter.default.notifications(named: .gitbayRepositoryChanged)
8889
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" }
9093 await model.perform(.delete, on: repo)
9194
9295 #expect(model.actionError == nil)