Skip to content

Commit 2faec8c

Browse files
committed
fixup: Wait for C-Chain balance to avoid racing in CI
1 parent f60ce01 commit 2faec8c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/e2e/x/interchain_workflow.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,13 @@ var _ = e2e.DescribeXChain("[Interchain Workflow]", func() {
110110
require.NoError(err)
111111
})
112112

113-
ginkgo.By("checking that the recipient address has received imported funds on the C-Chain", func() {
114-
ethClient := e2e.Env.NewEthClient()
113+
ginkgo.By("checking that the recipient address has received imported funds on the C-Chain")
114+
ethClient := e2e.Env.NewEthClient()
115+
e2e.Eventually(func() bool {
115116
balance, err := ethClient.BalanceAt(e2e.DefaultContext(), recipientEthAddress, nil)
116117
require.NoError(err)
117-
require.Greater(balance.Cmp(big.NewInt(0)), 0)
118-
})
118+
return balance.Cmp(big.NewInt(0)) > 0
119+
}, e2e.DefaultTimeout, e2e.DefaultPollingInterval, "failed to see recipient address funded before timeout")
119120

120121
ginkgo.By("exporting AVAX from the X-Chain to the P-Chain", func() {
121122
_, err := xWallet.IssueExportTx(

0 commit comments

Comments
 (0)