Skip to content

Commit

Permalink
Network tests: start gateway synchronously to fix race
Browse files Browse the repository at this point in the history
  • Loading branch information
BedrockSquirrel committed Jun 3, 2024
1 parent b335bd1 commit 2398625
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions integration/networktest/env/network_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 2398625

Please sign in to comment.