Skip to content

Commit 544edc5

Browse files
committed
rename
1 parent 8c1fab2 commit 544edc5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

coderd/agentapi/stats_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,11 @@ func TestUpdateStates(t *testing.T) {
172172
dbM.EXPECT().GetUserByID(gomock.Any(), user.ID).Return(user, nil)
173173

174174
// Ensure that pubsub notifications are sent.
175-
publishAgentStats := make(chan bool)
175+
publishStats := make(chan bool)
176176
ps.Subscribe(codersdk.WorkspaceNotifyChannel(workspace.ID), func(_ context.Context, description []byte) {
177177
go func() {
178-
publishAgentStats <- bytes.Equal(description, []byte{})
179-
close(publishAgentStats)
178+
publishStats <- bytes.Equal(description, []byte{})
179+
close(publishStats)
180180
}()
181181
})
182182

@@ -199,8 +199,8 @@ func TestUpdateStates(t *testing.T) {
199199
select {
200200
case <-ctx.Done():
201201
t.Error("timed out while waiting for pubsub notification")
202-
case wasAgentStatsOnly := <-publishAgentStats:
203-
require.Equal(t, wasAgentStatsOnly, true)
202+
case publishStatsReceived := <-publishStats:
203+
require.Equal(t, publishStatsReceived, true)
204204
}
205205
require.True(t, updateAgentMetricsFnCalled)
206206
})

0 commit comments

Comments
 (0)