From 9d0058a09e47a2fd1dc6f74298566a34bae16f03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Furkan=20T=C3=BCrkal?= Date: Thu, 21 Oct 2021 15:59:20 +0300 Subject: [PATCH] Bind port 0 in main_test (#9558) Fixes #9499 Signed-off-by: Furkan --- cmd/prometheus/main_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/prometheus/main_test.go b/cmd/prometheus/main_test.go index 182b6d228..98b2dd9cf 100644 --- a/cmd/prometheus/main_test.go +++ b/cmd/prometheus/main_test.go @@ -202,7 +202,7 @@ func TestWALSegmentSizeBounds(t *testing.T) { } for size, expectedExitStatus := range map[string]int{"9MB": 1, "257MB": 1, "10": 2, "1GB": 1, "12MB": 0} { - prom := exec.Command(promPath, "-test.main", "--storage.tsdb.wal-segment-size="+size, "--config.file="+promConfig) + prom := exec.Command(promPath, "-test.main", "--storage.tsdb.wal-segment-size="+size, "--web.listen-address=0.0.0.0:0", "--config.file="+promConfig) // Log stderr in case of failure. stderr, err := prom.StderrPipe() @@ -244,7 +244,7 @@ func TestMaxBlockChunkSegmentSizeBounds(t *testing.T) { } for size, expectedExitStatus := range map[string]int{"512KB": 1, "1MB": 0} { - prom := exec.Command(promPath, "-test.main", "--storage.tsdb.max-block-chunk-segment-size="+size, "--config.file="+promConfig) + prom := exec.Command(promPath, "-test.main", "--storage.tsdb.max-block-chunk-segment-size="+size, "--web.listen-address=0.0.0.0:0", "--config.file="+promConfig) // Log stderr in case of failure. stderr, err := prom.StderrPipe()