(r *logrepl.LogicalReplicator)
| 747 | } |
| 748 | |
| 749 | func 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 | |
| 765 | func waitForCaughtUp(r *logrepl.LogicalReplicator) error { |
| 766 | log.Println("Waiting for replication to catch up") |
no test coverage detected