(t *testing.T, h *Harness, nodeId state.NodeId, expected int64)
| 345 | } |
| 346 | |
| 347 | func 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 | |
| 362 | func readCentralTimestamp(t *testing.T, h *Harness, nodeId state.NodeId) int64 { |
| 363 | t.Helper() |
no test coverage detected