yandex-tank/Tests/Dummy.py
2012-10-15 15:52:57 +04:00

37 lines
851 B
Python

from tankcore import AbstractPlugin
import time
class DummyPlugin(AbstractPlugin):
def __init__(self, core):
AbstractPlugin.__init__(self, core)
self.count = 0
@staticmethod
def get_key():
return __file__
def configure(self):
self.log.warn("Configure")
def prepare_test(self):
self.log.warn("Prepare")
def start_test(self):
self.log.warn("Start")
def is_test_finished(self):
self.count += 1
if self.count > 3:
self.log.warn("Triggering exit")
return 0
else:
self.log.warn("Delaying")
time.sleep(0.2)
return -1
def end_test(self, retcode):
self.log.warn("End")
def post_process(self, retcode):
self.log.warn("Post-process")