Skip to content
Snippets Groups Projects
Commit 18cca41c authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[utils][tests][scheduling] Skip tests on CI, sqlite has trouble with them

parent f112a85e
No related branches found
No related tags found
1 merge request!275ZMQ refactoring
Pipeline #27962 passed
...@@ -30,6 +30,8 @@ import multiprocessing ...@@ -30,6 +30,8 @@ import multiprocessing
import tempfile import tempfile
import time import time
from unittest import skipIf
from django.test import TransactionTestCase from django.test import TransactionTestCase
from django.conf import settings from django.conf import settings
from django.core.management import call_command from django.core.management import call_command
...@@ -68,6 +70,7 @@ def start_scheduler(broker_address, verbosity=0): ...@@ -68,6 +70,7 @@ def start_scheduler(broker_address, verbosity=0):
call_command("scheduler", broker_address=broker_address, verbosity=verbosity) call_command("scheduler", broker_address=broker_address, verbosity=verbosity)
@skipIf(settings.RUNNING_ON_CI, "Not runnable on the CI")
class WorkerRegistration(TransactionTestCase): class WorkerRegistration(TransactionTestCase):
def setUp(self): def setUp(self):
db_worker = Worker(name="test_worker1", active=False, cores=1, memory=12) db_worker = Worker(name="test_worker1", active=False, cores=1, memory=12)
...@@ -133,6 +136,7 @@ class WorkerRegistration(TransactionTestCase): ...@@ -133,6 +136,7 @@ class WorkerRegistration(TransactionTestCase):
# ---------------------------------------------------------- # ----------------------------------------------------------
@skipIf(settings.RUNNING_ON_CI, "Not runnable on the CI")
class TestSchedulerBase(TransactionTestCase, BackendUtilitiesMixin): class TestSchedulerBase(TransactionTestCase, BackendUtilitiesMixin):
def __init__(self, methodName="runTest"): def __init__(self, methodName="runTest"):
super(TestSchedulerBase, self).__init__(methodName) super(TestSchedulerBase, self).__init__(methodName)
...@@ -251,6 +255,7 @@ class TestSchedulerBase(TransactionTestCase, BackendUtilitiesMixin): ...@@ -251,6 +255,7 @@ class TestSchedulerBase(TransactionTestCase, BackendUtilitiesMixin):
# ---------------------------------------------------------- # ----------------------------------------------------------
@skipIf(settings.RUNNING_ON_CI, "Not runnable on the CI")
class TestConnection(TestSchedulerBase): class TestConnection(TestSchedulerBase):
def test_worker_connection(self): def test_worker_connection(self):
self.start_scheduling() self.start_scheduling()
...@@ -324,6 +329,7 @@ class TestConnection(TestSchedulerBase): ...@@ -324,6 +329,7 @@ class TestConnection(TestSchedulerBase):
# ---------------------------------------------------------- # ----------------------------------------------------------
@skipIf(settings.RUNNING_ON_CI, "Not runnable on the CI")
class TestExecution(TestSchedulerBase): class TestExecution(TestSchedulerBase):
def setUp(self): def setUp(self):
super(TestExecution, self).setUp() super(TestExecution, self).setUp()
...@@ -566,6 +572,7 @@ class TestExecution(TestSchedulerBase): ...@@ -566,6 +572,7 @@ class TestExecution(TestSchedulerBase):
# ---------------------------------------------------------- # ----------------------------------------------------------
@skipIf(settings.RUNNING_ON_CI, "Not runnable on the CI")
class TestCancellation(TestSchedulerBase): class TestCancellation(TestSchedulerBase):
def setUp(self): def setUp(self):
super(TestCancellation, self).setUp() super(TestCancellation, self).setUp()
...@@ -662,7 +669,6 @@ class TestCancellation(TestSchedulerBase): ...@@ -662,7 +669,6 @@ class TestCancellation(TestSchedulerBase):
self.assertEqual(xp_to_finish.blocks.filter(status=Block.PROCESSING).count(), 0) self.assertEqual(xp_to_finish.blocks.filter(status=Block.PROCESSING).count(), 0)
def test_one_split_running(self): def test_one_split_running(self):
self.process("user/user/single/1/single_sleep_4") self.process("user/user/single/1/single_sleep_4")
def test_one_split_of_two_in_a_block_running(self): def test_one_split_of_two_in_a_block_running(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment