fix: use static port number for prometheus test (#14000)

This commit is contained in:
Marcin Tojek
2024-07-24 14:54:36 +02:00
committed by GitHub
parent dac14fe581
commit b3a3671c6a
+4 -4
View File
@@ -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{