Skip to content

Commit c8b2f1a

Browse files
author
balogh.adam@icloud.com
committed
wait for opg transfer
1 parent 78c86d7 commit c8b2f1a

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

integrationtest/llm/test_llm_chat.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,21 @@ def _fund_account(funder_key: str, recipient_address: str):
7676
if opg_receipt.status != 1:
7777
raise RuntimeError(f"OPG transfer failed: {opg_hash.hex()}")
7878

79-
# Wait for the recipient balance to be visible on the RPC node
79+
# Wait for the recipient balances to be visible on the RPC node
8080
for _ in range(5):
8181
if w3.eth.get_balance(recipient) > 0:
8282
break
8383
time.sleep(1)
8484
else:
8585
raise RuntimeError("Recipient ETH balance is still 0 after funding")
8686

87+
for _ in range(10):
88+
if token.functions.balanceOf(recipient).call() > 0:
89+
break
90+
time.sleep(1)
91+
else:
92+
raise RuntimeError("Recipient OPG token balance is still 0 after funding")
93+
8794

8895
@pytest.fixture(scope="module")
8996
def llm_client():

0 commit comments

Comments
 (0)