From 1f061d5a8f4e9c75787a971b00b7658ab5ff41b0 Mon Sep 17 00:00:00 2001 From: Pavel Zbitskiy Date: Thu, 9 May 2024 13:41:24 -0400 Subject: [PATCH 1/2] tests: make e2e TestBasicSuspension less flaky --- test/e2e-go/features/incentives/suspension_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/e2e-go/features/incentives/suspension_test.go b/test/e2e-go/features/incentives/suspension_test.go index 2b0f451c1b..46f7ae1399 100644 --- a/test/e2e-go/features/incentives/suspension_test.go +++ b/test/e2e-go/features/incentives/suspension_test.go @@ -116,6 +116,14 @@ func TestBasicSuspension(t *testing.T) { fixture.SendMoneyAndWait(afterStop.LastRound+suspend20, 5, 1000, richAccount.Address, account10.Address, "") fixture.SendMoneyAndWait(afterStop.LastRound+suspend20, 5, 1000, richAccount.Address, account20.Address, "") + // all nodes are in sync + status, err := fixture.LibGoalClient.Status() + a.NoError(err) + for _, c := range []libgoal.Client{c10, c20} { + _, err := c.WaitForRound(status.LastRound) + a.NoError(err) + } + // n20's account is now offline, but has voting key material (suspended) account, err = c10.AccountData(account20.Address) a.NoError(err) From 3ef0cb730de2e78d595a4ae912e2bcbe01604909 Mon Sep 17 00:00:00 2001 From: Pavel Zbitskiy Date: Thu, 9 May 2024 14:07:56 -0400 Subject: [PATCH 2/2] do not wait for c20 since it is stopped --- test/e2e-go/features/incentives/suspension_test.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/e2e-go/features/incentives/suspension_test.go b/test/e2e-go/features/incentives/suspension_test.go index 46f7ae1399..6768f7926e 100644 --- a/test/e2e-go/features/incentives/suspension_test.go +++ b/test/e2e-go/features/incentives/suspension_test.go @@ -116,13 +116,11 @@ func TestBasicSuspension(t *testing.T) { fixture.SendMoneyAndWait(afterStop.LastRound+suspend20, 5, 1000, richAccount.Address, account10.Address, "") fixture.SendMoneyAndWait(afterStop.LastRound+suspend20, 5, 1000, richAccount.Address, account20.Address, "") - // all nodes are in sync + // make sure c10 node is in-sync with the network status, err := fixture.LibGoalClient.Status() a.NoError(err) - for _, c := range []libgoal.Client{c10, c20} { - _, err := c.WaitForRound(status.LastRound) - a.NoError(err) - } + _, err = c10.WaitForRound(status.LastRound) + a.NoError(err) // n20's account is now offline, but has voting key material (suspended) account, err = c10.AccountData(account20.Address)