From 39152bff5cfb37b6f289e206fe2e9bf30c8e6968 Mon Sep 17 00:00:00 2001 From: gfanton <8671905+gfanton@users.noreply.github.com> Date: Thu, 19 Oct 2023 09:01:49 -0400 Subject: [PATCH] fix(integration): waiting for node readiness Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com> --- gno.land/pkg/integration/testing_integration.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gno.land/pkg/integration/testing_integration.go b/gno.land/pkg/integration/testing_integration.go index be87ea1135a..d44a1f220a0 100644 --- a/gno.land/pkg/integration/testing_integration.go +++ b/gno.land/pkg/integration/testing_integration.go @@ -10,6 +10,7 @@ import ( "strings" "sync" "testing" + "time" "github.com/gnolang/gno/gno.land/pkg/gnoland" "github.com/gnolang/gno/tm2/pkg/bft/config" @@ -133,6 +134,12 @@ func SetupGnolandTestScript(t *testing.T, txtarDir string) testscript.Params { } }) + select { + case <-time.After(time.Second * 6): + ts.Fatalf("timeout while waiting for the node to start") + case <-waitForNodeReadiness(node): // ok + } + // Register cleanup. nodes[sid] = &testNode{ Node: node,