itest: add a small delay before connecting grpc

This commit is contained in:
Jesse de Wit
2024-03-07 10:45:37 +01:00
parent 85e1324e2b
commit 01255274ab
2 changed files with 4 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ import (
"path/filepath" "path/filepath"
"sync" "sync"
"syscall" "syscall"
"time"
"github.com/breez/lntest" "github.com/breez/lntest"
"github.com/breez/lspd/config" "github.com/breez/lspd/config"
@@ -157,6 +158,7 @@ func (c *ClnLspNode) Start() {
}, },
}) })
<-time.After(time.Second)
conn, err := grpc.Dial( conn, err := grpc.Dial(
c.lspBase.grpcAddress, c.lspBase.grpcAddress,
grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithTransportCredentials(insecure.NewCredentials()),

View File

@@ -11,6 +11,7 @@ import (
"strings" "strings"
"sync" "sync"
"syscall" "syscall"
"time"
"github.com/breez/lntest" "github.com/breez/lntest"
"github.com/breez/lspd/config" "github.com/breez/lspd/config"
@@ -180,6 +181,7 @@ func (c *LndLspNode) Start() {
}, },
}) })
<-time.After(time.Second)
conn, err := grpc.Dial( conn, err := grpc.Dial(
c.lspBase.grpcAddress, c.lspBase.grpcAddress,
grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithTransportCredentials(insecure.NewCredentials()),