Skip to content

Commit c7f5212

Browse files
authored
fix: Flaky tests by disabling TLS for nodes in mock_server (#1240)
Signed-off-by: Manish Dait <[email protected]>
1 parent a8e2eb4 commit c7f5212

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
117117
- Fix unit test tet_query.py
118118
- TLS Hostname Mismatch & Certificate Verification Failure for Nodes
119119
- Workflow does not contain permissions for `pr-check-test-files` and `pr-check-codecov`
120+
- Flaky tests by disabling TLS in mock Hedera nodes in `mock_server.py`
120121

121122

122123
### Breaking Change

tests/unit/mock_server.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,14 @@ def mock_hedera_servers(response_sequences):
148148
# Configure the network with mock servers
149149
nodes = []
150150
for i, server in enumerate(servers):
151-
nodes.append(_Node(AccountId(0, 0, 3 + i), server.address, None))
151+
node = _Node(AccountId(0, 0, 3 + i), server.address, None)
152+
153+
# force insecure transport
154+
node._apply_transport_security(False)
155+
node._set_verify_certificates(False)
156+
157+
nodes.append(node)
158+
152159

153160
# Create network and client
154161
network = Network(nodes=nodes)

0 commit comments

Comments
 (0)