(t *testing.T, srv *Server, itemID string)
| 152 | func (ft *fakeTab) close() { _ = ft.conn.Close(); <-ft.done } |
| 153 | |
| 154 | func waitPatchCapable(t *testing.T, srv *Server, itemID string) { |
| 155 | t.Helper() |
| 156 | deadline := time.Now().Add(applierProbeBudget) |
| 157 | for !srv.collab.HasElectablePatchApplier(itemID) { |
| 158 | if time.Now().After(deadline) { |
| 159 | t.Fatal("no patch-capable applier became electable") |
| 160 | } |
| 161 | time.Sleep(applierProbePoll) |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | // The unknown outcome resolves through the SAME connection: its tab re-acks |
| 166 | // the patch it applied, the retry answers 200, and it is applied once. |
no test coverage detected