From 23986257e74533a045526f2b19b302c6e23ec507 Mon Sep 17 00:00:00 2001 From: Matt Curtis Date: Mon, 3 Jun 2024 23:53:49 +0100 Subject: [PATCH] Network tests: start gateway synchronously to fix race --- integration/networktest/env/network_setup.go | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/integration/networktest/env/network_setup.go b/integration/networktest/env/network_setup.go index 06ae70ab75..bd107052da 100644 --- a/integration/networktest/env/network_setup.go +++ b/integration/networktest/env/network_setup.go @@ -114,15 +114,14 @@ func (t *testnetEnv) startTenGateway() { TenChainID: integration.TenChainID, } tenGWContainer := walletextension.NewContainerFromConfig(cfg, t.logger) - go func() { - fmt.Println("Starting Ten Gateway, HTTP Port:", _gwHTTPPort, "WS Port:", _gwWSPort) - err := tenGWContainer.Start() - if err != nil { - t.logger.Error("failed to start ten gateway", "err", err) - panic(err) - } - t.tenGatewayContainer = tenGWContainer - }() + + fmt.Println("Starting Ten Gateway, HTTP Port:", _gwHTTPPort, "WS Port:", _gwWSPort) + err := tenGWContainer.Start() + if err != nil { + t.logger.Error("failed to start ten gateway", "err", err) + panic(err) + } + t.tenGatewayContainer = tenGWContainer t.testnetConnector.tenGatewayURL = fmt.Sprintf("http://localhost:%d", _gwHTTPPort) }