Skip to content

Commit

Permalink
Trying to track down a failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jannotti committed Mar 25, 2024
1 parent 648f95e commit 9c8211c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/e2e-go/features/incentives/suspension_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func TestBasicSuspension(t *testing.T) {
a.NotZero(account.VoteID)
a.False(account.IncentiveEligible) // suspension turns off flag

// n10's account is still online, because it's got less stake, not absent 10 x interval.
// n10's account is still online, because it's got less stake, has not been absent 10 x interval.
account, err = c10.AccountData(account10.Address)
a.NoError(err)
a.Equal(basics.Online, account.Status)
Expand All @@ -135,10 +135,12 @@ func TestBasicSuspension(t *testing.T) {
lg, err := fixture.StartNode(c20.DataDir())
a.NoError(err)

// Wait for newly restarted node to start. Presumably it'll catchup in
// seconds, and propose by round 90
// Wait for newly restarted node to start.
stat, err := lg.Status()
a.NoError(err)
// Waiting for this round should show it has started and caught up.
stat, err = lg.WaitForRound(afterStop.LastRound + 55)
a.NoError(err)

// Proceed until a round is proposed by n20. (Stop at 50 rounds, that's more likely a bug than luck)
for r := stat.LastRound; r < stat.LastRound+50; r++ {
Expand All @@ -154,9 +156,11 @@ func TestBasicSuspension(t *testing.T) {
}
}
// n20's account is back online, with same voting material
account, err = fixture.LibGoalClient.AccountData(account20.Address)
account, err = c10.AccountData(account20.Address)
a.NoError(err)
a.Equal(basics.Online, account.Status)
a.Greater(account.LastProposed, stat.LastRound)

a.Equal(voteID, account.VoteID)
a.False(account.IncentiveEligible)
}

0 comments on commit 9c8211c

Please sign in to comment.