[arvados] created: 2.5.0-92-ge20590d48

git repository hosting git at public.arvados.org
Thu Feb 2 21:29:44 UTC 2023


        at  e20590d485505f58f7745d74a311ca539c9be940 (commit)


commit e20590d485505f58f7745d74a311ca539c9be940
Author: Tom Clegg <tom at curii.com>
Date:   Thu Feb 2 16:28:25 2023 -0500

    20032: Fix unnecessary race in test.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/lib/controller/localdb/container_gateway_test.go b/lib/controller/localdb/container_gateway_test.go
index 2c882c785..3f63e7aa8 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) {

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list