Home | History | Annotate | Download | only in flaky_test
      1 #pylint: disable-msg=C0111
      2 import time
      3 import random
      4 
      5 from autotest_lib.client.bin import test
      6 from autotest_lib.client.common_lib import error
      7 
      8 class 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