Skip to content

Commit 184af27

Browse files
committed
use unbuffered channels for flush
1 parent 601136c commit 184af27

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

coderd/workspaceapps/apptest/apptest.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ func Run(t *testing.T, appHostIsPrimary bool, factory DeploymentFactory) {
147147
require.NoError(t, err)
148148
require.True(t, loc.Query().Has("message"))
149149
require.True(t, loc.Query().Has("redirect"))
150-
assertWorkspaceLastUsedAtUpdated(t, appDetails)
150+
assertWorkspaceLastUsedAtNotUpdated(t, appDetails)
151151
})
152152

153153
t.Run("LoginWithoutAuthOnProxy", func(t *testing.T) {
@@ -185,7 +185,7 @@ func Run(t *testing.T, appHostIsPrimary bool, factory DeploymentFactory) {
185185
// request is getting stripped.
186186
require.Equal(t, u.Path, redirectURI.Path+"/")
187187
require.Equal(t, u.RawQuery, redirectURI.RawQuery)
188-
assertWorkspaceLastUsedAtUpdated(t, appDetails)
188+
assertWorkspaceLastUsedAtNotUpdated(t, appDetails)
189189
})
190190

191191
t.Run("NoAccessShould404", func(t *testing.T) {

coderd/workspaceapps_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ func TestWorkspaceApps(t *testing.T) {
262262
opts.AppHost = ""
263263
}
264264

265-
statsFlushCh := make(chan chan<- struct{}, 1)
265+
statsFlushCh := make(chan chan<- struct{})
266266
opts.StatsCollectorOptions.Flush = statsFlushCh
267267
flushStats := func() {
268268
flushDone := make(chan struct{})

enterprise/wsproxy/wsproxy_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ func TestWorkspaceProxyWorkspaceApps(t *testing.T) {
442442
"*",
443443
}
444444

445-
proxyFlushCh := make(chan chan<- struct{}, 1)
445+
proxyFlushCh := make(chan chan<- struct{})
446446
flushStats := func() {
447-
proxyFlushDone := make(chan struct{}, 1)
447+
proxyFlushDone := make(chan struct{})
448448
proxyFlushCh <- proxyFlushDone
449449
<-proxyFlushDone
450450
}

0 commit comments

Comments
 (0)