From e20590d485505f58f7745d74a311ca539c9be940 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Thu, 2 Feb 2023 16:28:25 -0500 Subject: [PATCH] 20032: Fix unnecessary race in test. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- lib/controller/localdb/container_gateway_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/controller/localdb/container_gateway_test.go b/lib/controller/localdb/container_gateway_test.go index 2c882c7852..3f63e7aa8a 100644 --- a/lib/controller/localdb/container_gateway_test.go +++ b/lib/controller/localdb/container_gateway_test.go @@ -311,7 +311,6 @@ func (s *ContainerGatewaySuite) testConnectThroughTunnel(c *check.C, expectError // Until the tunnel starts up, set gateway_address to a value // that can't work. We want to ensure the only way we can // reach the gateway is through the tunnel. - gwaddr := "127.0.0.1:0" tungw := &crunchrun.Gateway{ ContainerUUID: s.ctrUUID, AuthSecret: s.gw.AuthSecret, @@ -320,7 +319,7 @@ func (s *ContainerGatewaySuite) testConnectThroughTunnel(c *check.C, expectError ArvadosClient: s.gw.ArvadosClient, UpdateTunnelURL: func(url string) { c.Logf("UpdateTunnelURL(%q)", url) - gwaddr = "tunnel " + url + gwaddr := "tunnel " + url s.localdb.ContainerUpdate(rootctx, arvados.UpdateOptions{ UUID: s.ctrUUID, Attrs: map[string]interface{}{ @@ -338,8 +337,8 @@ func (s *ContainerGatewaySuite) testConnectThroughTunnel(c *check.C, expectError _, err = s.localdb.ContainerUpdate(rootctx, arvados.UpdateOptions{ UUID: s.ctrUUID, Attrs: map[string]interface{}{ - "state": arvados.ContainerStateRunning, - "gateway_address": gwaddr}}) + "state": arvados.ContainerStateRunning, + }}) c.Assert(err, check.IsNil) for deadline := time.Now().Add(5 * time.Second); time.Now().Before(deadline); time.Sleep(time.Second / 2) { -- 2.30.2