From 189c10770afa22598359facd504c1de6dd52bd10 Mon Sep 17 00:00:00 2001 From: Daniel McNally Date: Wed, 26 Aug 2020 16:28:53 -0400 Subject: [PATCH] test(sim): extend gRPC TLS certificate timeouts This aims to decrease failed simulation tests due to the TLS certificate taking too long to be created by xud. --- test/simulation/xudtest/node.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/simulation/xudtest/node.go b/test/simulation/xudtest/node.go index ca6921f5d..44204077c 100644 --- a/test/simulation/xudtest/node.go +++ b/test/simulation/xudtest/node.go @@ -3,7 +3,6 @@ package xudtest import ( "bytes" "fmt" - "github.com/ExchangeUnion/xud-simulation/shared" "net" "os" "os/exec" @@ -13,6 +12,8 @@ import ( "sync/atomic" "time" + "github.com/ExchangeUnion/xud-simulation/shared" + "github.com/ExchangeUnion/xud-simulation/connexttest" "context" @@ -314,7 +315,7 @@ func (hn *HarnessNode) ConnectRPC(useMacs bool) (*grpc.ClientConn, error) { opts := []grpc.DialOption{ grpc.WithBlock(), - grpc.WithTimeout(time.Second * 20), + grpc.WithTimeout(time.Second * 40), } tlsCreds, err := credentials.NewClientTLSFromFile(hn.Cfg.TLSCertPath, "") @@ -324,7 +325,7 @@ func (hn *HarnessNode) ConnectRPC(useMacs bool) (*grpc.ClientConn, error) { } fmt.Printf("Failed to read TLS certificate: %v, remaining tries: %v\n", err, tries-1) - time.Sleep(2 * time.Second) + time.Sleep(5 * time.Second) tlsCreds, err = credentials.NewClientTLSFromFile(hn.Cfg.TLSCertPath, "") }