1#pylint: disable-msg=C0111 2import time 3import random 4 5from autotest_lib.client.bin import test 6from autotest_lib.client.common_lib import error 7 8class flaky_test(test.test): 9 version = 1 10 11 def run_once(self, seconds=1): 12 if random.randint(0,1): 13 raise error.TestFailRetry('Flaky test failed intentionally.') 14 15 time.sleep(seconds) 16