diff --git a/enterprise/cli/provisionerdaemons_test.go b/enterprise/cli/provisionerdaemons_test.go index 299ddd1d4f..b8e785ec45 100644 --- a/enterprise/cli/provisionerdaemons_test.go +++ b/enterprise/cli/provisionerdaemons_test.go @@ -301,11 +301,11 @@ func TestProvisionerDaemon_SessionToken(t *testing.T) { }) } -//nolint:paralleltest,tparallel // Prometheus endpoint tends to fail with `bind: address already in use`. +//nolint:paralleltest,tparallel // Test uses a static port. func TestProvisionerDaemon_PrometheusEnabled(t *testing.T) { - t.Skip("Flaky test - see https://github.com/coder/coder/issues/13931") - - prometheusPort := testutil.RandomPortNoListen(t) + // Ephemeral ports have a tendency to conflict and fail with `bind: address already in use` error. + // This workaround forces a static port for Prometheus that hopefully won't be used by other tests. + prometheusPort := 32001 // Configure CLI client client, admin := coderdenttest.New(t, &coderdenttest.Options{