From 8274ac2e5ad9248c4bd32a6808ad0f0ddad13de8 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Wed, 10 Aug 2016 16:28:05 -0700 Subject: [PATCH] tests: Make sure we try tests on free ports. (#2402) Fixes #2376 --- checkport_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/checkport_test.go b/checkport_test.go index 84a3d9d3e..41c986f1a 100644 --- a/checkport_test.go +++ b/checkport_test.go @@ -23,12 +23,13 @@ import ( "testing" ) +// Tests for port availability logic written for server startup sequence. func TestCheckPortAvailability(t *testing.T) { tests := []struct { port int }{ - {9000}, - {10000}, + {getFreePort()}, + {getFreePort()}, } for _, test := range tests { // This test should pass if the ports are available