From ecca1f965342eda03e075acb0d2cdad7a1e15201 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Mon, 27 Jul 2020 14:15:36 +0200 Subject: [PATCH] itest: fix flakiness around/startup/reconnect --- lntest/harness.go | 4 +++- lntest/itest/log_error_whitelist.txt | 7 +++++++ lntest/itest/log_substitutions.txt | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lntest/harness.go b/lntest/harness.go index 89a4141ba..aa20c3b9c 100644 --- a/lntest/harness.go +++ b/lntest/harness.go @@ -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 diff --git a/lntest/itest/log_error_whitelist.txt b/lntest/itest/log_error_whitelist.txt index 59f1bdc3a..deb6abc9c 100644 --- a/lntest/itest/log_error_whitelist.txt +++ b/lntest/itest/log_error_whitelist.txt @@ -2,6 +2,8 @@