Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb03cc29

Browse files
committed
fix windows test?
1 parent9e228f6 commitb03cc29

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎coderd/insights_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,17 @@ func TestUserLatencyInsights(t *testing.T) {
160160
require.NoError(t,err)
161161
defersshConn.Close()
162162

163+
sess,err:=sshConn.NewSession()
164+
require.NoError(t,err)
165+
defersess.Close()
166+
167+
r,w:=io.Pipe()
168+
deferr.Close()
169+
deferw.Close()
170+
sess.Stdin=r
171+
err=sess.Start("cat")
172+
require.NoError(t,err)
173+
163174
varuserLatencies codersdk.UserLatencyInsightsResponse
164175
require.Eventuallyf(t,func()bool {
165176
userLatencies,err=client.UserLatencyInsights(ctx, codersdk.UserLatencyInsightsRequest{
@@ -174,6 +185,7 @@ func TestUserLatencyInsights(t *testing.T) {
174185
},testutil.WaitShort,testutil.IntervalFast,"user latency is missing")
175186

176187
// We got our latency data, close the connection.
188+
_=sess.Close()
177189
_=sshConn.Close()
178190

179191
require.Len(t,userLatencies.Report.Users,1,"want only 1 user")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp