aboutsummaryrefslogtreecommitdiffstats
path: root/core/syncer/watch-cat_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/syncer/watch-cat_test.go')
-rw-r--r--core/syncer/watch-cat_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/syncer/watch-cat_test.go b/core/syncer/watch-cat_test.go
index 1dbf479..103200d 100644
--- a/core/syncer/watch-cat_test.go
+++ b/core/syncer/watch-cat_test.go
@@ -60,22 +60,23 @@ func (rec *recovery) Votes(height uint64) (uint64, error) {
}
func (s *WatchCatTestSuite) newWatchCat(
- notarySetSize uint32, polling time.Duration) (*WatchCat, *recovery) {
+ notarySetSize uint32, polling, timeout time.Duration) (*WatchCat, *recovery) {
cfg := &testConfigAccessor{
notarySetSize: notarySetSize,
}
recovery := &recovery{
votes: make(map[uint64]uint64),
}
- return NewWatchCat(recovery, cfg, polling, &common.NullLogger{}), recovery
+ wc := NewWatchCat(recovery, cfg, polling, timeout, &common.NullLogger{})
+ return wc, recovery
}
func (s *WatchCatTestSuite) TestBasicUsage() {
polling := 50 * time.Millisecond
timeout := 50 * time.Millisecond
notarySet := uint32(24)
- watchCat, rec := s.newWatchCat(notarySet, polling)
- watchCat.Start(timeout)
+ watchCat, rec := s.newWatchCat(notarySet, polling, timeout)
+ watchCat.Start()
defer watchCat.Stop()
pos := types.Position{
Height: 10,