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

Commitfade8ba

Browse files
authored
fix: fix MeasureLatencyRecvTimeout to accept send=0 (#13477)
Fixes the flake seen here:https://github.com/coder/coder/runs/25832852690Linux is not a real time operating system, and so there is no guarantee that subsequent `time.Now()` `time.Since()` calls will return a non-zero time. This assert is mainly there to ensure we don't return `-1`.
1 parent775fc3f commitfade8ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎coderd/database/pubsub/pubsub_linux_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ func TestMeasureLatency(t *testing.T) {
351351

352352
send,recv,err:=pubsub.NewLatencyMeasurer(logger).Measure(ctx,ps)
353353
require.ErrorContains(t,err,context.Canceled.Error())
354-
require.Greater(t,send.Nanoseconds(),int64(0))
354+
require.GreaterOrEqual(t,send.Nanoseconds(),int64(0))
355355
require.EqualValues(t,recv,time.Duration(-1))
356356
})
357357

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp