Skip to content

Commit

Permalink
tests/e2e_finjector: add teardown method
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ztlpn committed Sep 8, 2022
1 parent 2284e9f commit c333fc7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/rptest/tests/e2e_finjector.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,9 @@ def _failure_injector_loop(self):
self.redpanda.logger.info(
f"waiting {delay} seconds before next failure")
time.sleep(delay)

def teardown(self):
self.enable_failures = False
if self.finjector_thread:
self.finjector_thread.join()
FailureInjector(self.redpanda)._heal_all()

0 comments on commit c333fc7

Please sign in to comment.