From 6ef1f9362ccb0b0fb323b0a9e067a26f7e656c34 Mon Sep 17 00:00:00 2001 From: Marcelo Salhab Brogliato Date: Tue, 27 Jan 2026 16:20:06 -0600 Subject: [PATCH] test: Fix flaky tests --- hathor_tests/consensus/test_soft_voided.py | 2 ++ hathor_tests/simulation/test_simulator.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hathor_tests/consensus/test_soft_voided.py b/hathor_tests/consensus/test_soft_voided.py index 0c2c042d6..087ac9037 100644 --- a/hathor_tests/consensus/test_soft_voided.py +++ b/hathor_tests/consensus/test_soft_voided.py @@ -54,6 +54,8 @@ def _run_test( yield gen_tx2 + gen_tx2.stop() + self.assertEqual(1, len(soft_voided_tx_ids)) txA_hash = list(soft_voided_tx_ids)[0] diff --git a/hathor_tests/simulation/test_simulator.py b/hathor_tests/simulation/test_simulator.py index eb74091e3..bbbe469de 100644 --- a/hathor_tests/simulation/test_simulator.py +++ b/hathor_tests/simulation/test_simulator.py @@ -115,7 +115,7 @@ def test_new_syncing_peer(self) -> None: for hashpower in [10e6, 8e6, 5e6]: manager = self.create_peer() for node in nodes: - conn = FakeConnection(manager, node, latency=0.085) + conn = FakeConnection(manager, node, latency=0.085, autoreconnect=True) self.simulator.add_connection(conn) nodes.append(manager)