itest: fix flakiness around/startup/reconnect

This commit is contained in:
Oliver Gugger committed 2020-07-27 14:15:36 +02:00
1 parent 5d5e6c369d
commit ecca1f9653
3 files changed
+12 -2

No files matched your search

+3 -1
View File
@@ -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