Commit bf8b3455 by cahrens

Remove flaky decorator.

Increased number of retries, as it is expected that sometimes
a seed will be reused. TNL-6041
parent a637121d
...@@ -13,7 +13,6 @@ import textwrap ...@@ -13,7 +13,6 @@ import textwrap
import unittest import unittest
import ddt import ddt
import flaky
from lxml import etree from lxml import etree
from mock import Mock, patch, DEFAULT from mock import Mock, patch, DEFAULT
import webob import webob
...@@ -1412,7 +1411,6 @@ class CapaModuleTest(unittest.TestCase): ...@@ -1412,7 +1411,6 @@ class CapaModuleTest(unittest.TestCase):
RANDOMIZATION.ALWAYS, RANDOMIZATION.ALWAYS,
RANDOMIZATION.ONRESET RANDOMIZATION.ONRESET
) )
@flaky.flaky # TNL-6041
def test_random_seed_with_reset(self, rerandomize): def test_random_seed_with_reset(self, rerandomize):
""" """
Run the test for each possible rerandomize value Run the test for each possible rerandomize value
...@@ -1470,13 +1468,13 @@ class CapaModuleTest(unittest.TestCase): ...@@ -1470,13 +1468,13 @@ class CapaModuleTest(unittest.TestCase):
# to another valid seed # to another valid seed
else: else:
# Since there's a small chance we might get the # Since there's a small chance (expected) we might get the
# same seed again, give it 5 chances # same seed again, give it 10 chances
# to generate a different seed # to generate a different seed
success = _retry_and_check(5, lambda: _reset_and_get_seed(module) != seed) success = _retry_and_check(10, lambda: _reset_and_get_seed(module) != seed)
self.assertIsNotNone(module.seed) self.assertIsNotNone(module.seed)
msg = 'Could not get a new seed from reset after 5 tries' msg = 'Could not get a new seed from reset after 10 tries'
self.assertTrue(success, msg) self.assertTrue(success, msg)
@ddt.data( @ddt.data(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment