diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-07-30 11:57:56 +0200 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-08-11 17:00:30 +0200 |
commit | e9416f5ebdced75f9463073a25d2b999969124a4 (patch) | |
tree | 64c55ff059c997fb59d9ada7adca50a90356321a /service/test | |
parent | 5d45904c0d26045bc5174210577527506997b16b (diff) |
Start events server before running functional tests.
- Issue #420
- Should create server.key before behave tests
- Revert "move events diabling to AppTestClient for functional tests"
Diffstat (limited to 'service/test')
-rw-r--r-- | service/test/functional/features/environment.py | 2 | ||||
-rw-r--r-- | service/test/support/integration/app_test_client.py | 3 | ||||
-rw-r--r-- | service/test/support/integration/soledad_test_base.py | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/service/test/functional/features/environment.py b/service/test/functional/features/environment.py index e598ee67..07b733de 100644 --- a/service/test/functional/features/environment.py +++ b/service/test/functional/features/environment.py @@ -17,6 +17,7 @@ import logging import uuid from crochet import setup, wait_for +from leap.common.events.server import ensure_server from test.support.dispatcher.proxy import Proxy from test.support.integration import AppTestClient from selenium import webdriver @@ -28,6 +29,7 @@ setup() @wait_for(timeout=5.0) def start_app_test_client(client): + ensure_server() return client.start_client() diff --git a/service/test/support/integration/app_test_client.py b/service/test/support/integration/app_test_client.py index e4f9e82a..c6cd9936 100644 --- a/service/test/support/integration/app_test_client.py +++ b/service/test/support/integration/app_test_client.py @@ -42,7 +42,6 @@ from pixelated.resources.root_resource import RootResource from test.support.integration.model import MailBuilder from test.support.test_helper import request_mock from test.support.integration.model import ResponseMail -from leap.common.events.flags import set_events_enabled class AppTestClient(object): @@ -56,8 +55,6 @@ class AppTestClient(object): @defer.inlineCallbacks def start_client(self): - # This class wont work with zmq events for now, check again on future - set_events_enabled(False) soledad_test_folder = self._generate_soledad_test_folder_name() SearchEngine.DEFAULT_INDEX_HOME = soledad_test_folder diff --git a/service/test/support/integration/soledad_test_base.py b/service/test/support/integration/soledad_test_base.py index 979b1f96..5fed3a12 100644 --- a/service/test/support/integration/soledad_test_base.py +++ b/service/test/support/integration/soledad_test_base.py @@ -15,6 +15,7 @@ # along with Pixelated. If not, see <http://www.gnu.org/licenses/>. from twisted.trial import unittest from test.support.integration.app_test_client import AppTestClient +from leap.common.events.flags import set_events_enabled class SoledadTestBase(unittest.TestCase, AppTestClient): @@ -23,7 +24,9 @@ class SoledadTestBase(unittest.TestCase, AppTestClient): DEFERRED_TIMEOUT_LONG = 300 def setUp(self): + set_events_enabled(False) return self.start_client() def tearDown(self): + set_events_enabled(True) self.cleanup() |