@@ -209,7 +209,7 @@ func TestRecordHeartbeatShardStatisticsThrottlesWrites(t *testing.T) {
209209 shardID : {Status : types .ShardStatusREADY , ShardLoad : baseLoad },
210210 },
211211 }))
212- statsAfterFirst := getShardStats (t , executorStore , ctx , tc .Namespace , shardID )
212+ statsAfterFirst := getShardStats (ctx , t , executorStore , tc .Namespace , shardID )
213213 require .NotNil (t , statsAfterFirst )
214214
215215 // Advance time by less than the persist interval and provide a small delta: should skip the write.
@@ -221,7 +221,7 @@ func TestRecordHeartbeatShardStatisticsThrottlesWrites(t *testing.T) {
221221 shardID : {Status : types .ShardStatusREADY , ShardLoad : baseLoad + smallDelta },
222222 },
223223 }))
224- statsAfterSkip := getShardStats (t , executorStore , ctx , tc .Namespace , shardID )
224+ statsAfterSkip := getShardStats (ctx , t , executorStore , tc .Namespace , shardID )
225225 require .NotNil (t , statsAfterSkip )
226226 assert .Equal (t , statsAfterFirst .LastUpdateTime , statsAfterSkip .LastUpdateTime , "small recent deltas should not trigger a persist" )
227227
@@ -234,7 +234,7 @@ func TestRecordHeartbeatShardStatisticsThrottlesWrites(t *testing.T) {
234234 shardID : {Status : types .ShardStatusREADY , ShardLoad : baseLoad + smallDelta / 2 },
235235 },
236236 }))
237- statsAfterForce := getShardStats (t , executorStore , ctx , tc .Namespace , shardID )
237+ statsAfterForce := getShardStats (ctx , t , executorStore , tc .Namespace , shardID )
238238 require .NotNil (t , statsAfterForce )
239239 assert .Greater (t , statsAfterForce .LastUpdateTime , statsAfterSkip .LastUpdateTime , "stale stats must be refreshed even if delta is small" )
240240}
@@ -770,7 +770,7 @@ func createStoreWithTimeSource(t *testing.T, tc *testhelper.StoreTestCluster, ts
770770 return store
771771}
772772
773- func getShardStats (t * testing.T , s store.Store , ctx context. Context , namespace , shardID string ) * store.ShardStatistics {
773+ func getShardStats (ctx context. Context , t * testing.T , s store.Store , namespace , shardID string ) * store.ShardStatistics {
774774 t .Helper ()
775775 nsState , err := s .GetState (ctx , namespace )
776776 require .NoError (t , err )
0 commit comments