itest: fix flakiness around/startup/reconnect
This commit is contained in:
3 files changed
+12
-2
No files matched your search
+3
-1
@@ -403,7 +403,9 @@ func (n *NetworkHarness) connect(ctx context.Context,
|
||||
tryconnect:
|
||||
if _, err := a.ConnectPeer(ctx, req); err != nil {
|
||||
// If the chain backend is still syncing, retry.
|
||||
if err == lnd.ErrServerNotActive {
|
||||
if strings.Contains(err.Error(), lnd.ErrServerNotActive.Error()) ||
|
||||
strings.Contains(err.Error(), "i/o timeout") {
|
||||
|
||||
select {
|
||||
case <-time.After(100 * time.Millisecond):
|
||||
goto tryconnect
|
||||
|
||||
Reference in new issue
Block a user