Skip to content

Commit 7238d6f

Browse files
committed
fix integration tests
1 parent 8d06f4c commit 7238d6f

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

tests/integration/it_utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ def accept_ledger(
232232
delay: float for how many seconds to wait before accepting ledger.
233233
"""
234234
client = _choose_client(use_json_client)
235-
SyncTestTimer(client, delay)
235+
timer = SyncTestTimer(client, delay)
236+
timer._timer.join() # Wait for the timer to finish
236237

237238

238239
async def accept_ledger_async(
@@ -247,7 +248,8 @@ async def accept_ledger_async(
247248
delay: float for how many seconds to wait before accepting ledger.
248249
"""
249250
client = _choose_client_async(use_json_client)
250-
AsyncTestTimer(client, delay)
251+
timer = AsyncTestTimer(client, delay)
252+
await timer._job()
251253

252254

253255
def _choose_client(use_json_client: bool) -> SyncClient:

tests/integration/transactions/test_escrow.py

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,16 @@
1818
SOURCE_TAG = 11747
1919

2020
FINISH_FUNCTION = (
21-
"0061736d010000000105016000017f021b0108686f73745f6c69620e6765745f6c"
22-
"65646765725f73716e0000030201000405017001010105030100100619037f0141"
23-
"8080c0000b7f00418080c0000b7f00418080c0000b072d04066d656d6f72790200"
24-
"05726561647900010a5f5f646174615f656e6403010b5f5f686561705f62617365"
25-
"03020a0d010b0010808080800041044a0b006e046e616d65000e0d7761736d5f6c"
26-
"69622e7761736d01430200395f5a4e387761736d5f6c696238686f73745f6c6962"
27-
"31346765745f6c65646765725f73716e3137686663383539386237646539633036"
28-
"64624501057265616479071201000f5f5f737461636b5f706f696e746572005509"
29-
"70726f64756365727302086c616e6775616765010452757374000c70726f636573"
30-
"7365642d62790105727573746325312e38332e302d6e696768746c792028633266"
31-
"37346333663920323032342d30392d30392900490f7461726765745f6665617475"
32-
"726573042b0a6d756c746976616c75652b0f6d757461626c652d676c6f62616c73"
33-
"2b0f7265666572656e63652d74797065732b087369676e2d657874"
21+
"0061736d010000000105016000017f02190108686f73745f6c69620c6765"
22+
"744c656467657253716e00000302010005030100100611027f00418080c0"
23+
"000b7f00418080c0000b072e04066d656d6f727902000666696e69736800"
24+
"010a5f5f646174615f656e6403000b5f5f686561705f6261736503010a09"
25+
"010700100041044a0b004d0970726f64756365727302086c616e67756167"
26+
"65010452757374000c70726f6365737365642d6279010572757374631d31"
27+
"2e38352e31202834656231363132353020323032352d30332d3135290049"
28+
"0f7461726765745f6665617475726573042b0f6d757461626c652d676c6f"
29+
"62616c732b087369676e2d6578742b0f7265666572656e63652d74797065"
30+
"732b0a6d756c746976616c7565"
3431
)
3532

3633

@@ -56,8 +53,8 @@ async def test_all_fields_cancel(self, client):
5653
sequence = response.result["tx_json"]["Sequence"]
5754
# TODO: check account_objects
5855

59-
for _ in range(4):
60-
await accept_ledger_async(delay=0.5)
56+
for _ in range(3):
57+
await accept_ledger_async()
6158

6259
escrow_cancel = EscrowCancel(
6360
account=ACCOUNT,
@@ -90,8 +87,8 @@ async def test_all_fields_finish(self, client):
9087
sequence = response.result["tx_json"]["Sequence"]
9188
# TODO: check account_objects
9289

93-
for _ in range(6):
94-
await accept_ledger_async(delay=0.5)
90+
for _ in range(2):
91+
await accept_ledger_async()
9592

9693
escrow_finish = EscrowFinish(
9794
account=ACCOUNT,
@@ -127,6 +124,7 @@ async def test_finish_function(self, client):
127124
account=ACCOUNT,
128125
owner=ACCOUNT,
129126
offer_sequence=sequence,
127+
computation_allowance=5,
130128
)
131129
response = await sign_and_reliable_submission_async(
132130
escrow_finish, WALLET, client

0 commit comments

Comments
 (0)