From 61b3b8bf0d6e926d08b1c24c4818e188a9e00ea9 Mon Sep 17 00:00:00 2001 From: Filip Date: Thu, 15 Jul 2021 12:42:54 +0200 Subject: [PATCH 1/6] Use command_index when calling get_exec_batch_results --- yapapi/rest/activity.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/yapapi/rest/activity.py b/yapapi/rest/activity.py index afd4f6cc8..626e42cd8 100644 --- a/yapapi/rest/activity.py +++ b/yapapi/rest/activity.py @@ -195,7 +195,11 @@ async def __aiter__(self) -> AsyncIterator[events.CommandEventContext]: raise BatchTimeoutError() try: results: List[yaa.ExeScriptCommandResult] = await self._api.get_exec_batch_results( - self._activity_id, self._batch_id, _request_timeout=min(timeout, 5) + self._activity_id, + self._batch_id, + command_index=last_idx, + # timeout=min(timeout, 5), + _request_timeout=min(timeout, 5) ) except asyncio.TimeoutError: continue From e02e51bfe4aa3c57c4034c9008b904417453f4de Mon Sep 17 00:00:00 2001 From: Filip Date: Thu, 15 Jul 2021 12:52:57 +0200 Subject: [PATCH 2/6] Formatting --- yapapi/rest/activity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yapapi/rest/activity.py b/yapapi/rest/activity.py index 626e42cd8..73c645ec9 100644 --- a/yapapi/rest/activity.py +++ b/yapapi/rest/activity.py @@ -199,7 +199,7 @@ async def __aiter__(self) -> AsyncIterator[events.CommandEventContext]: self._batch_id, command_index=last_idx, # timeout=min(timeout, 5), - _request_timeout=min(timeout, 5) + _request_timeout=min(timeout, 5), ) except asyncio.TimeoutError: continue From e81e430da7513bd7636dddaf5b969bf4fab65019 Mon Sep 17 00:00:00 2001 From: Filip Date: Thu, 15 Jul 2021 16:36:49 +0200 Subject: [PATCH 3/6] Increase timeouts in the blender integration test --- tests/goth_tests/test_run_blender.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/goth_tests/test_run_blender.py b/tests/goth_tests/test_run_blender.py index 485c63ad4..7ef4daa16 100644 --- a/tests/goth_tests/test_run_blender.py +++ b/tests/goth_tests/test_run_blender.py @@ -77,9 +77,9 @@ async def test_run_blender( await all_sent.wait_for_result(timeout=120) logger.info("All tasks sent") - await all_computed.wait_for_result(timeout=30) + await all_computed.wait_for_result(timeout=120) logger.info("All tasks computed, waiting for Executor shutdown") - await cmd_monitor.wait_for_pattern(".*Executor has shut down", timeout=120) + await cmd_monitor.wait_for_pattern(".*Executor has shut down", timeout=180) logger.info("Requestor script finished") From b2994456a1a78663ef19644a56eb26d622ed5b92 Mon Sep 17 00:00:00 2001 From: Filip Date: Thu, 15 Jul 2021 20:23:28 +0200 Subject: [PATCH 4/6] Increase timeouts in the yacat integration test --- tests/goth_tests/test_run_yacat.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/goth_tests/test_run_yacat.py b/tests/goth_tests/test_run_yacat.py index 83c21391d..d367a564f 100644 --- a/tests/goth_tests/test_run_yacat.py +++ b/tests/goth_tests/test_run_yacat.py @@ -81,13 +81,13 @@ async def test_run_yacat( ) logger.info("Keyspace found") - await all_sent.wait_for_result(timeout=30) + await all_sent.wait_for_result(timeout=60) logger.info("All tasks sent") - await all_computed.wait_for_result(timeout=60) + await all_computed.wait_for_result(timeout=120) logger.info("All tasks computed") - await cmd_monitor.wait_for_pattern(".*Password found: yo", timeout=10) + await cmd_monitor.wait_for_pattern(".*Password found: yo", timeout=60) logger.info("Password found, waiting for Executor shutdown") await cmd_monitor.wait_for_pattern(".*Executor has shut down", timeout=120) From 4a6549be5c5370eaa38f851183b35bf83b6310b4 Mon Sep 17 00:00:00 2001 From: filipgolem <44880692+filipgolem@users.noreply.github.com> Date: Sat, 17 Jul 2021 10:10:51 +0200 Subject: [PATCH 5/6] Uncomment timeout parameter in get_exec_batch_results --- yapapi/rest/activity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yapapi/rest/activity.py b/yapapi/rest/activity.py index 73c645ec9..b63559395 100644 --- a/yapapi/rest/activity.py +++ b/yapapi/rest/activity.py @@ -198,7 +198,7 @@ async def __aiter__(self) -> AsyncIterator[events.CommandEventContext]: self._activity_id, self._batch_id, command_index=last_idx, - # timeout=min(timeout, 5), + timeout=min(timeout, 5), _request_timeout=min(timeout, 5), ) except asyncio.TimeoutError: From ffb2b9d05e855db423da1de228e5a0036ce1b65e Mon Sep 17 00:00:00 2001 From: filipgolem <44880692+filipgolem@users.noreply.github.com> Date: Sat, 17 Jul 2021 10:15:31 +0200 Subject: [PATCH 6/6] Make _request_timeout larger than timeout --- yapapi/rest/activity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yapapi/rest/activity.py b/yapapi/rest/activity.py index b63559395..d8e20f36f 100644 --- a/yapapi/rest/activity.py +++ b/yapapi/rest/activity.py @@ -199,7 +199,7 @@ async def __aiter__(self) -> AsyncIterator[events.CommandEventContext]: self._batch_id, command_index=last_idx, timeout=min(timeout, 5), - _request_timeout=min(timeout, 5), + _request_timeout=min(timeout, 5) + 1, ) except asyncio.TimeoutError: continue