Skip to content

Commit c333fc7

Browse files
committed
tests/e2e_finjector: add teardown method
Previously we did not heal network failures when exiting tests that use this base class (namely, AvailabilityTests). As possible failure types included netem failures, that meant that all subsequent tests in a test run used a node with crippled network, leading to flakiness. Fixes redpanda-data#5980
1 parent 2284e9f commit c333fc7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/rptest/tests/e2e_finjector.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,9 @@ def _failure_injector_loop(self):
8989
self.redpanda.logger.info(
9090
f"waiting {delay} seconds before next failure")
9191
time.sleep(delay)
92+
93+
def teardown(self):
94+
self.enable_failures = False
95+
if self.finjector_thread:
96+
self.finjector_thread.join()
97+
FailureInjector(self.redpanda)._heal_all()

0 commit comments

Comments
 (0)