MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / waitPatchCapable

Function waitPatchCapable

internal/server/task3585_patch_key_test.go:154–163  ·  view source on GitHub ↗
(t *testing.T, srv *Server, itemID string)

Source from the content-addressed store, hash-verified

152func (ft *fakeTab) close() { _ = ft.conn.Close(); <-ft.done }
153
154func 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.

Calls 6

HelperMethod · 0.80
FatalMethod · 0.80
AddMethod · 0.65
NowMethod · 0.65
AfterMethod · 0.45

Tested by

no test coverage detected