MCPcopy Create free account
hub / github.com/encodeous/nylon / assertCentralTimestampStays

Function assertCentralTimestampStays

e2e/distribution_test.go:347–360  ·  view source on GitHub ↗
(t *testing.T, h *Harness, nodeId state.NodeId, expected int64)

Source from the content-addressed store, hash-verified

345}
346
347func assertCentralTimestampStays(t *testing.T, h *Harness, nodeId state.NodeId, expected int64) {
348 t.Helper()
349 deadline := time.Now().Add(2 * time.Second)
350 for {
351 got := readCentralTimestamp(t, h, nodeId)
352 if got != expected {
353 t.Fatalf("expected central config timestamp to remain %d, got %d", expected, got)
354 }
355 if time.Now().After(deadline) {
356 return
357 }
358 time.Sleep(250 * time.Millisecond)
359 }
360}
361
362func readCentralTimestamp(t *testing.T, h *Harness, nodeId state.NodeId) int64 {
363 t.Helper()

Calls 2

readCentralTimestampFunction · 0.85
AfterMethod · 0.80

Tested by

no test coverage detected