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

Commit9acf6ac

Browse files
authored
test: use static port for Prometheus (#14972)
Fixes:coder/internal#92
1 parent4369f2b commit9acf6ac

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎enterprise/cli/proxyserver_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ func Test_ProxyServer_Headers(t *testing.T) {
5959
assert.EqualValues(t,1,atomic.LoadInt64(&called))
6060
}
6161

62+
//nolint:paralleltest,tparallel // Test uses a static port.
6263
funcTestWorkspaceProxy_Server_PrometheusEnabled(t*testing.T) {
63-
t.Parallel()
64-
65-
prometheusPort:=testutil.RandomPort(t)
64+
// Ephemeral ports have a tendency to conflict and fail with `bind: address already in use` error.
65+
// This workaround forces a static port for Prometheus that hopefully won't be used by other tests.
66+
prometheusPort:=32002
6667

6768
varwg sync.WaitGroup
6869
wg.Add(1)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp