diff --git a/pytests/uibasetest.py b/pytests/uibasetest.py index 08aecfee37..204897d606 100644 --- a/pytests/uibasetest.py +++ b/pytests/uibasetest.py @@ -22,7 +22,6 @@ class BaseUITestCase(unittest.TestCase): - skip_setup_failed = False # selenium thread def _start_selenium(self): @@ -70,7 +69,6 @@ def _is_selenium_running(self): return True return False - @unittest.skipIf(skip_setup_failed, "setup was failed") def setUp(self): try: self.log = logger.Logger.get_logger() @@ -109,7 +107,8 @@ def setUp(self): self.servers[0].port)) self.driver.maximize_window() except Exception as ex: - skip_setup_failed = True + self.input.test_params["stop-on-failure"] = True + self.log.error("SETUP WAS FAILED. ALL TESTS WILL BE SKIPPED") self.fail(ex) @staticmethod diff --git a/pytests/viewmergetests.py b/pytests/viewmergetests.py index ec4ac177c1..a6c38186e0 100644 --- a/pytests/viewmergetests.py +++ b/pytests/viewmergetests.py @@ -20,9 +20,7 @@ class ViewMergingTests(BaseTestCase): - skip_setup_failed = False - @unittest.skipIf(skip_setup_failed, "setup was failed") def setUp(self): try: if 'first_case' not in TestInputSingleton.input.test_params: @@ -45,7 +43,8 @@ def setUp(self): if 'first_case' in TestInputSingleton.input.test_params: self.create_ddocs() except Exception as ex: - skip_setup_failed = True + self.input.test_params["stop-on-failure"] = True + self.log.error("SETUP WAS FAILED. ALL TESTS WILL BE SKIPPED") self.fail(ex) def tearDown(self): diff --git a/pytests/viewquerytests.py b/pytests/viewquerytests.py index b6c4692689..e0ea9844b5 100644 --- a/pytests/viewquerytests.py +++ b/pytests/viewquerytests.py @@ -41,9 +41,6 @@ def stopped(self): return self._stop.isSet() class ViewQueryTests(unittest.TestCase): - skip_setup_failed = False - - @unittest.skipIf(skip_setup_failed, "setup was failed") def setUp(self): try: ViewBaseTests.common_setUp(self) @@ -64,11 +61,8 @@ def setUp(self): else: ViewBaseTests._create_multiple_buckets(self, replica=self.replica) except Exception as ex: - skip_setup_failed = True - try: - self.tearDown() - except: - pass + self.input.test_params["stop-on-failure"] = True + self.log.error("SETUP WAS FAILED. ALL TESTS WILL BE SKIPPED") self.fail(ex) def tearDown(self):