MCPcopy Create free account
hub / github.com/dolthub/doltgresql / waitForRunning

Function waitForRunning

testing/go/replication_test.go:749–763  ·  view source on GitHub ↗
(r *logrepl.LogicalReplicator)

Source from the content-addressed store, hash-verified

747}
748
749func waitForRunning(r *logrepl.LogicalReplicator) error {
750 start := time.Now()
751 for {
752 if r.Running() {
753 break
754 }
755
756 if time.Since(start) > 500*time.Millisecond {
757 return errors.New("Replication did not start")
758 }
759 time.Sleep(5 * time.Millisecond)
760 }
761
762 return nil
763}
764
765func waitForCaughtUp(r *logrepl.LogicalReplicator) error {
766 log.Println("Waiting for replication to catch up")

Callers 1

handlePseudoQueryFunction · 0.85

Calls 1

RunningMethod · 0.80

Tested by

no test coverage detected