Problem:
The current mock_server setup has a few issues that can lead to flaky tests behaviours:
-
TLS settings are applied directly on _Node instances using internal methods. these mutations get overridde during Client network initialization.
-
No thread safe when handling concurrent grpc requests. some time resulting in poping out all the response before execution complete:
FAILED tests/unit/transaction_test.py::test_execute_returns_receipt_without_error_when_validation_disabled[6584-10000] - grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
Proposed Solution:
- Move TLS configuration to
Network level instead of mutating _Node
- Add thread safety for responses