66 "testing"
77 "time"
88
9- types3 "github.com/uber/cadence/service/sharddistributor/store/etcd/types"
10-
119 "github.com/stretchr/testify/assert"
1210 "github.com/stretchr/testify/require"
1311 "go.uber.org/fx/fxtest"
@@ -16,6 +14,7 @@ import (
1614 "github.com/uber/cadence/common/types"
1715 "github.com/uber/cadence/service/sharddistributor/store"
1816 "github.com/uber/cadence/service/sharddistributor/store/etcd/etcdkeys"
17+ "github.com/uber/cadence/service/sharddistributor/store/etcd/etcdtypes"
1918 "github.com/uber/cadence/service/sharddistributor/store/etcd/executorstore/common"
2019 "github.com/uber/cadence/service/sharddistributor/store/etcd/leaderstore"
2120 "github.com/uber/cadence/service/sharddistributor/store/etcd/testhelper"
@@ -60,7 +59,7 @@ func TestRecordHeartbeat(t *testing.T) {
6059 resp , err := tc .Client .Get (ctx , heartbeatKey )
6160 require .NoError (t , err )
6261 assert .Equal (t , int64 (1 ), resp .Count , "Heartbeat key should exist" )
63- assert .Equal (t , types3 .FromTime (now ), string (resp .Kvs [0 ].Value ))
62+ assert .Equal (t , etcdtypes .FromTime (now ), string (resp .Kvs [0 ].Value ))
6463
6564 resp , err = tc .Client .Get (ctx , stateKey )
6665 require .NoError (t , err )
@@ -545,7 +544,7 @@ func TestShardStatisticsPersistence(t *testing.T) {
545544 stats := store.ShardStatistics {SmoothedLoad : 12.5 , LastUpdateTime : time .Unix (1234 , 0 ).UTC (), LastMoveTime : time .Unix (5678 , 0 ).UTC ()}
546545 shardStatsKey , err := etcdkeys .BuildShardKey (tc .EtcdPrefix , tc .Namespace , shardID , etcdkeys .ShardStatisticsKey )
547546 require .NoError (t , err )
548- payload , err := json .Marshal (types3 .FromShardStatistics (& stats ))
547+ payload , err := json .Marshal (etcdtypes .FromShardStatistics (& stats ))
549548 require .NoError (t , err )
550549 _ , err = tc .Client .Put (ctx , shardStatsKey , string (payload ))
551550 require .NoError (t , err )
0 commit comments