From 4af8db0106a68a985ab01c6336c80f721046be92 Mon Sep 17 00:00:00 2001 From: Albert <26584478+albertteoh@users.noreply.github.com> Date: Fri, 18 Sep 2020 15:24:22 +1000 Subject: [PATCH] Update cmd/query/app/server_test.go Co-authored-by: Yuri Shkuro --- cmd/query/app/server_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/query/app/server_test.go b/cmd/query/app/server_test.go index 49aa83db0c41..bef661ccf563 100644 --- a/cmd/query/app/server_test.go +++ b/cmd/query/app/server_test.go @@ -75,8 +75,8 @@ func TestServerBadHostPort(t *testing.T) { func TestServerInUseHostPort(t *testing.T) { const availableHostPort = "127.0.0.1:0" conn, err := net.Listen("tcp", availableHostPort) - defer func() { conn.Close() }() - assert.NoError(t, err) + require.NoError(t, err) + defer func() { require.NoError(t, conn.Close()) }() testCases := []struct { name string