From ee5052f0b0abd566251da9ce4db6b5bc98ea0473 Mon Sep 17 00:00:00 2001 From: Natalie Bunduwongse Date: Mon, 11 Nov 2024 13:45:51 +1300 Subject: [PATCH] test: call timeout for register off chain --- sample/Assets/Scripts/AuthenticatedScript.cs | 8 ++++++-- sample/Tests/test/test.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sample/Assets/Scripts/AuthenticatedScript.cs b/sample/Assets/Scripts/AuthenticatedScript.cs index 51748870..1ec448ad 100644 --- a/sample/Assets/Scripts/AuthenticatedScript.cs +++ b/sample/Assets/Scripts/AuthenticatedScript.cs @@ -265,6 +265,8 @@ public async void RegisterOffchain() try { + Passport.SetCallTimeout(120000); + RegisterUserResponse response = await Passport.RegisterOffchain(); if (response != null) @@ -280,10 +282,12 @@ public async void RegisterOffchain() { ShowOutput($"Unable to register off-chain: {e.Message} ({e.Type})"); } - catch (Exception) + catch (Exception e) { - ShowOutput("Unable to register off-chain"); + ShowOutput($"Unable to register off-chain {e.Message}"); } + + Passport.SetCallTimeout(60000); } /// diff --git a/sample/Tests/test/test.py b/sample/Tests/test/test.py index 77be9c4f..da2f3fbf 100644 --- a/sample/Tests/test/test.py +++ b/sample/Tests/test/test.py @@ -61,7 +61,7 @@ def test_2_imx_functions(self): # Register off-chain # Wait up to 3 times for "Passport account already registered" to appear attempts = 0 - while attempts < 3: + while attempts < 6: self.altdriver.find_object(By.NAME, "RegisterOffchainBtn").tap() self.assertEqual("Registering off-chain...", output.get_text()) time.sleep(20)