File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ import (
3838
3939 "github.com/uber/cadence/common"
4040 "github.com/uber/cadence/common/cache"
41+ "github.com/uber/cadence/common/clock"
4142 "github.com/uber/cadence/common/cluster"
4243 "github.com/uber/cadence/common/log"
4344 "github.com/uber/cadence/common/log/testlogger"
@@ -287,6 +288,9 @@ func (s *contextTestSuite) TestDomainNotificationVersion() {
287288}
288289
289290func (s * contextTestSuite ) TestTimerMaxReadLevel () {
291+ // this test requires mocked time since we're comparing timestamps
292+ s .mockResource .TimeSource = clock .NewMockedTimeSource ()
293+
290294 // get current cluster's level
291295 gotLevel := s .context .UpdateTimerMaxReadLevel (cluster .TestCurrentClusterName )
292296 wantLevel := s .mockResource .TimeSource .Now ().Add (s .context .config .TimerProcessorMaxTimeShift ()).Truncate (time .Millisecond )
You can’t perform that action at this time.
0 commit comments