Skip to content

Commit ee5052f

Browse files
committed
test: call timeout for register off chain
1 parent 6a5a57e commit ee5052f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

sample/Assets/Scripts/AuthenticatedScript.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ public async void RegisterOffchain()
265265

266266
try
267267
{
268+
Passport.SetCallTimeout(120000);
269+
268270
RegisterUserResponse response = await Passport.RegisterOffchain();
269271

270272
if (response != null)
@@ -280,10 +282,12 @@ public async void RegisterOffchain()
280282
{
281283
ShowOutput($"Unable to register off-chain: {e.Message} ({e.Type})");
282284
}
283-
catch (Exception)
285+
catch (Exception e)
284286
{
285-
ShowOutput("Unable to register off-chain");
287+
ShowOutput($"Unable to register off-chain {e.Message}");
286288
}
289+
290+
Passport.SetCallTimeout(60000);
287291
}
288292

289293
/// <summary>

sample/Tests/test/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def test_2_imx_functions(self):
6161
# Register off-chain
6262
# Wait up to 3 times for "Passport account already registered" to appear
6363
attempts = 0
64-
while attempts < 3:
64+
while attempts < 6:
6565
self.altdriver.find_object(By.NAME, "RegisterOffchainBtn").tap()
6666
self.assertEqual("Registering off-chain...", output.get_text())
6767
time.sleep(20)

0 commit comments

Comments
 (0)