@@ -44,6 +44,7 @@ import (
4444 historyspb "go.temporal.io/server/api/history/v1"
4545 persistencespb "go.temporal.io/server/api/persistence/v1"
4646 "go.temporal.io/server/common"
47+ "go.temporal.io/server/common/cluster"
4748 "go.temporal.io/server/common/definition"
4849 "go.temporal.io/server/common/failure"
4950 "go.temporal.io/server/common/log"
@@ -837,10 +838,11 @@ func (s *mutableStateSuite) TestReplicateActivityTaskStartedEvent() {
837838}
838839
839840func (s * mutableStateSuite ) TestTotalEntitiesCount () {
841+ namespaceEntry := s .newNamespaceCacheEntry ()
840842 mutableState := TestLocalMutableState (
841843 s .mockShard ,
842844 s .mockEventsCache ,
843- s . newNamespaceCacheEntry () ,
845+ namespaceEntry ,
844846 s .logger ,
845847 uuid .New (),
846848 )
@@ -899,6 +901,12 @@ func (s *mutableStateSuite) TestTotalEntitiesCount() {
899901 )
900902 s .NoError (err )
901903
904+ s .mockShard .Resource .ClusterMetadata .EXPECT ().ClusterNameForFailoverVersion (
905+ namespaceEntry .IsGlobalNamespace (),
906+ mutableState .GetCurrentVersion (),
907+ ).Return (cluster .TestCurrentClusterName )
908+ s .mockShard .Resource .ClusterMetadata .EXPECT ().GetCurrentClusterName ().Return (cluster .TestCurrentClusterName )
909+
902910 mutation , _ , err := mutableState .CloseTransactionAsMutation (
903911 s .mockShard .GetTimeSource ().Now (),
904912 TransactionPolicyActive ,
0 commit comments