← Commit history

runner: busy-retry

John Lauer ·4c42ce3956 ·1mo ago ·parent 25df48a
1 file changed +7
tests/run_verb_tests.py+7
@@ -426,6 +426,13 @@ def main():             d, dt = call_polled(a.target, verb, run_args, run_args["_pollDoc"], run_args["_pollSec"])         else:             d, dt = call(a.target, verb, run_args, timeout=vt)+        # A busy main thread right after a heavy op (cloud open, export) is congestion,+        # not a verb failure - a real caller retries per the _hint. One retry, like they would.+        if d.get("errorCode") == "main_thread_busy" or str(d.get("error")) == "addin_command_timeout":+            time.sleep(12)+            d2, dt2 = call(a.target, verb, run_args, timeout=vt)+            if not (d2.get("errorCode") == "main_thread_busy" or str(d2.get("error")) == "addin_command_timeout"):+                d, dt = d2, dt + dt2         LAST_RESULTS[verb] = d         if str(d.get("error") or "") == "target_not_found":             flaps = getattr(sys.modules[__name__], "_FLAPS", 0) + 1