Skip to content

Commit

Permalink
Merge pull request #412 from LF-Decentralized-Trust-labs/e2e-batch
Browse files Browse the repository at this point in the history
Add retry in e2e to allow events to be fully processed
  • Loading branch information
dwertent authored Nov 7, 2024
2 parents 3e39735 + 5b383ee commit 8930594
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions domains/zeto/integration-test/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
_ "embed"
"encoding/json"
"testing"
"time"

"github.com/go-resty/resty/v2"
"github.com/hyperledger/firefly-signer/pkg/rpcbackend"
Expand Down Expand Up @@ -168,6 +169,14 @@ func (s *zetoDomainTestSuite) testZetoFungible(t *testing.T, tokenName string, u
if useBatch {
expectedCoins = 3
}

// some tokens like Zeto_AnonNullifier with batch can take some time to process
// so we need to retry at least once
if len(coins) != expectedCoins {
time.Sleep(1 * time.Second)
coins = findAvailableCoins(t, ctx, s.rpc, s.domain, zetoAddress, nil, isNullifiersToken)
}

require.Len(t, coins, expectedCoins)

if useBatch {
Expand Down

0 comments on commit 8930594

Please sign in to comment.