Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b3a3671

Browse files
authored
fix: use static port number for prometheus test (#14000)
1 parent dac14fe commit b3a3671

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

enterprise/cli/provisionerdaemons_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,11 @@ func TestProvisionerDaemon_SessionToken(t *testing.T) {
301301
})
302302
}
303303

304-
//nolint:paralleltest,tparallel // Prometheus endpoint tends to fail with `bind: address already in use`.
304+
//nolint:paralleltest,tparallel // Test uses a static port.
305305
func TestProvisionerDaemon_PrometheusEnabled(t *testing.T) {
306-
t.Skip("Flaky test - see https://github.com/coder/coder/issues/13931")
307-
308-
prometheusPort := testutil.RandomPortNoListen(t)
306+
// Ephemeral ports have a tendency to conflict and fail with `bind: address already in use` error.
307+
// This workaround forces a static port for Prometheus that hopefully won't be used by other tests.
308+
prometheusPort := 32001
309309

310310
// Configure CLI client
311311
client, admin := coderdenttest.New(t, &coderdenttest.Options{

0 commit comments

Comments
 (0)