diff --git a/ovn-tester/ovn_context.py b/ovn-tester/ovn_context.py index 60f8ddd7..ca96c7ed 100644 --- a/ovn-tester/ovn_context.py +++ b/ovn-tester/ovn_context.py @@ -35,33 +35,6 @@ def __exit__(self, type, value, traceback): ovn_stats.report(self.test_name, brief=self.brief_report) print(f'***** Exiting context {self.test_name} *****') - def __iter__(self): - return self - - def __next__(self): - now = time.perf_counter() - if self.iteration_start: - duration = now - self.iteration_start - ovn_stats.add(ITERATION_STAT_NAME, duration, failed=self.failed) - print(f'***** Context {self.test_name}, ' - f'Iteration {self.iteration}, ' - f'Result: {"FAILURE" if self.failed else "SUCCESS"} *****') - self.failed = False - if self.test: - # exec external cmd - # self.test.exec_cmd(self.iteration, self.test_name) - pass - self.iteration_start = now - if self.iteration < self.max_iterations - 1: - self.iteration += 1 - print(f'***** Context {self.test_name}, ' - f'Iteration {self.iteration} *****') - return self.iteration - raise StopIteration - - def fail(self): - self.failed = True - async def iteration_started(self, iteration): '''Explicitly begin iteration 'n'. This is necessary when running asynchronously since task starts and ends can overlap.'''