Skip to content

Commit 3e908d7

Browse files
committed
Fix update of got
1 parent 295dbdd commit 3e908d7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

coderd/workspaceagents_test.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -1294,7 +1294,13 @@ func TestWorkspaceAgent_Metadata(t *testing.T) {
12941294
// We can't trust the order of the updates due to timers and debounces,
12951295
// so let's check a few times once more.
12961296
for i := 0; i < 2 && (want.Value != got.Result.Value || want.Error != got.Result.Error); i++ {
1297-
recvUpdate()
1297+
update = recvUpdate()
1298+
for _, m := range update {
1299+
if m.Description.Key == got.Description.Key {
1300+
got = m
1301+
break
1302+
}
1303+
}
12981304
}
12991305
ok1 := assert.Equal(t, want.Value, got.Result.Value)
13001306
ok2 := assert.Equal(t, want.Error, got.Result.Error)

0 commit comments

Comments
 (0)