File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -172,11 +172,11 @@ func TestUpdateStates(t *testing.T) {
172
172
dbM .EXPECT ().GetUserByID (gomock .Any (), user .ID ).Return (user , nil )
173
173
174
174
// Ensure that pubsub notifications are sent.
175
- publishAgentStats := make (chan bool )
175
+ publishStats := make (chan bool )
176
176
ps .Subscribe (codersdk .WorkspaceNotifyChannel (workspace .ID ), func (_ context.Context , description []byte ) {
177
177
go func () {
178
- publishAgentStats <- bytes .Equal (description , []byte {})
179
- close (publishAgentStats )
178
+ publishStats <- bytes .Equal (description , []byte {})
179
+ close (publishStats )
180
180
}()
181
181
})
182
182
@@ -199,8 +199,8 @@ func TestUpdateStates(t *testing.T) {
199
199
select {
200
200
case <- ctx .Done ():
201
201
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 )
204
204
}
205
205
require .True (t , updateAgentMetricsFnCalled )
206
206
})
You can’t perform that action at this time.
0 commit comments