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 (
38
38
39
39
"github.com/uber/cadence/common"
40
40
"github.com/uber/cadence/common/cache"
41
+ "github.com/uber/cadence/common/clock"
41
42
"github.com/uber/cadence/common/cluster"
42
43
"github.com/uber/cadence/common/log"
43
44
"github.com/uber/cadence/common/log/testlogger"
@@ -287,6 +288,9 @@ func (s *contextTestSuite) TestDomainNotificationVersion() {
287
288
}
288
289
289
290
func (s * contextTestSuite ) TestTimerMaxReadLevel () {
291
+ // this test requires mocked time since we're comparing timestamps
292
+ s .mockResource .TimeSource = clock .NewMockedTimeSource ()
293
+
290
294
// get current cluster's level
291
295
gotLevel := s .context .UpdateTimerMaxReadLevel (cluster .TestCurrentClusterName )
292
296
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