Skip to content

Commit 05e0d1d

Browse files
committed
fix(shard distributor): linter error
Signed-off-by: Andreas Holt <[email protected]>
1 parent dd45ff0 commit 05e0d1d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

service/sharddistributor/store/etcd/executorstore/etcdstore_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)