diff options
author | Duda Dornelles <ddornell@thoughtworks.com> | 2014-11-19 10:40:14 -0200 |
---|---|---|
committer | Duda Dornelles <ddornell@thoughtworks.com> | 2014-11-19 10:40:14 -0200 |
commit | 68a906b6eec347481a0b7aa4c60e24ff02f5c26e (patch) | |
tree | f1e1feb2a05a2e55aff29cf9cfca5b9f008662ae /service | |
parent | 8e001a93b7d90bd394c9401c0f1b4acf77e4f9b7 (diff) |
Extracting deferred timeouts in tests to constants
Diffstat (limited to 'service')
-rw-r--r-- | service/test/integration/search_test.py | 8 | ||||
-rw-r--r-- | service/test/support/integration_helper.py | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/service/test/integration/search_test.py b/service/test/integration/search_test.py index 0a68ed5c..7415b9a1 100644 --- a/service/test/integration/search_test.py +++ b/service/test/integration/search_test.py @@ -23,7 +23,7 @@ class SearchTest(SoledadTestBase): def setUp(self): SoledadTestBase.setUp(self) - @deferred(timeout=120) + @deferred(timeout=SoledadTestBase.DEFERRED_TIMEOUT) def test_that_tags_returns_all_tags(self): input_mail = MailBuilder().with_tags(['important']).build_input_mail() self.add_mail_to_inbox(input_mail) @@ -40,7 +40,7 @@ class SearchTest(SoledadTestBase): d.addCallback(_assert) return d - @deferred(timeout=120) + @deferred(timeout=SoledadTestBase.DEFERRED_TIMEOUT) def test_that_tags_are_filtered_by_query(self): input_mail = MailBuilder().with_tags(['ateu', 'catoa', 'luat', 'zuado']).build_input_mail() self.add_mail_to_inbox(input_mail) @@ -57,7 +57,7 @@ class SearchTest(SoledadTestBase): d.addCallback(_assert) return d - @deferred(timeout=120) + @deferred(timeout=SoledadTestBase.DEFERRED_TIMEOUT) def test_that_default_tags_are_ignorable(self): input_mail = MailBuilder().with_tags(['sometag']).build_input_mail() self.add_mail_to_inbox(input_mail) @@ -71,7 +71,7 @@ class SearchTest(SoledadTestBase): d.addCallback(_assert) return d - @deferred(timeout=300) + @deferred(timeout=SoledadTestBase.DEFERRED_TIMEOUT_LONG) def test_tags_count(self): self.add_multiple_to_mailbox(num=10, mailbox='inbox', flags=['\\Recent']) self.add_multiple_to_mailbox(num=5, mailbox='inbox', flags=['\\Seen']) diff --git a/service/test/support/integration_helper.py b/service/test/support/integration_helper.py index fd8ce75a..d4f2a308 100644 --- a/service/test/support/integration_helper.py +++ b/service/test/support/integration_helper.py @@ -183,6 +183,9 @@ def setup_test_app(self): class SoledadTestBase(unittest.TestCase): + # these are so long because our CI is so slow at the moment. + DEFERRED_TIMEOUT = 120 + DEFERRED_TIMEOUT_LONG = 300 @classmethod def setUpClass(cls): |