Improve smartprotocol error handling and retries (#578)

* Improve smartprotocol error handling and retries

* Update after review

* Enum to IntEnum and SLEEP_SECONDS_AFTER_TIMEOUT
This commit is contained in:
sdb9696
2023-12-10 15:41:53 +00:00
committed by GitHub
parent a77af5fb3b
commit 2e6c41d039
7 changed files with 208 additions and 54 deletions

View File

@@ -86,7 +86,7 @@ async def test_protocol_retry_recoverable_error(
async def test_protocol_reconnect(mocker, retry_count, protocol_class, transport_class):
host = "127.0.0.1"
remaining = retry_count
mock_response = {"result": {"great": "success"}}
mock_response = {"result": {"great": "success"}, "error_code": 0}
def _fail_one_less_than_retry_count(*_, **__):
nonlocal remaining