Skip to content

Commit

Permalink
tests: fix flaky TestApplicationsUpgradeOverREST (algorand#6256)
Browse files Browse the repository at this point in the history
  • Loading branch information
algorandskiy authored Feb 15, 2025
1 parent 8fce49c commit 548b26a
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions test/e2e-go/upgrades/application_support_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ func TestApplicationsUpgradeOverREST(t *testing.T) {
a.NoError(err)

// Fund the manager, so it can issue transactions later on
_, err = client.SendPaymentFromUnencryptedWallet(creator, user, fee, 10000000000, nil)
tx0, err := client.SendPaymentFromUnencryptedWallet(creator, user, fee, 10000000000, nil)
a.NoError(err)
client.WaitForRound(round + 2)
isCommitted := fixture.WaitForTxnConfirmation(round+10, tx0.ID().String())
a.True(isCommitted)

// There should be no apps to start with
ad, err := client.AccountData(creator)
Expand Down Expand Up @@ -155,8 +156,6 @@ int 1
a.NoError(err)
signedTxn, err := client.SignTransactionWithWallet(wh, nil, tx)
a.NoError(err)
round, err = client.CurrentRound()
a.NoError(err)

successfullBroadcastCount := 0
_, err = client.BroadcastTransaction(signedTxn)
Expand Down Expand Up @@ -184,8 +183,6 @@ int 1
time.Sleep(time.Duration(smallLambdaMs) * time.Millisecond)
}

round = curStatus.LastRound

// make a change to the node field to ensure we're not broadcasting the same transaction as we tried before.
tx.Note = []byte{1, 2, 3}
signedTxn, err = client.SignTransactionWithWallet(wh, nil, tx)
Expand Down Expand Up @@ -295,7 +292,6 @@ int 1
a.NoError(err)
a.Equal(uint64(appIdx), app.Id)
a.Equal(creator, app.Params.Creator)
return
}

// TestApplicationsUpgrade tests that we can safely upgrade from a version that doesn't support applications
Expand Down Expand Up @@ -547,5 +543,4 @@ int 1
a.NoError(err)
a.Equal(uint64(appIdx), app.Id)
a.Equal(creator, app.Params.Creator)
return
}

0 comments on commit 548b26a

Please sign in to comment.