Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.web
Commits
18cca41c
Commit
18cca41c
authored
Mar 11, 2019
by
Samuel GAIST
Browse files
[utils][tests][scheduling] Skip tests on CI, sqlite has trouble with them
parent
f112a85e
Pipeline
#27962
passed with stage
in 15 minutes and 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
beat/web/utils/tests/test_scheduling.py
View file @
18cca41c
...
...
@@ -30,6 +30,8 @@ import multiprocessing
import
tempfile
import
time
from
unittest
import
skipIf
from
django.test
import
TransactionTestCase
from
django.conf
import
settings
from
django.core.management
import
call_command
...
...
@@ -68,6 +70,7 @@ def start_scheduler(broker_address, verbosity=0):
call_command
(
"scheduler"
,
broker_address
=
broker_address
,
verbosity
=
verbosity
)
@
skipIf
(
settings
.
RUNNING_ON_CI
,
"Not runnable on the CI"
)
class
WorkerRegistration
(
TransactionTestCase
):
def
setUp
(
self
):
db_worker
=
Worker
(
name
=
"test_worker1"
,
active
=
False
,
cores
=
1
,
memory
=
12
)
...
...
@@ -133,6 +136,7 @@ class WorkerRegistration(TransactionTestCase):
# ----------------------------------------------------------
@
skipIf
(
settings
.
RUNNING_ON_CI
,
"Not runnable on the CI"
)
class
TestSchedulerBase
(
TransactionTestCase
,
BackendUtilitiesMixin
):
def
__init__
(
self
,
methodName
=
"runTest"
):
super
(
TestSchedulerBase
,
self
).
__init__
(
methodName
)
...
...
@@ -251,6 +255,7 @@ class TestSchedulerBase(TransactionTestCase, BackendUtilitiesMixin):
# ----------------------------------------------------------
@
skipIf
(
settings
.
RUNNING_ON_CI
,
"Not runnable on the CI"
)
class
TestConnection
(
TestSchedulerBase
):
def
test_worker_connection
(
self
):
self
.
start_scheduling
()
...
...
@@ -324,6 +329,7 @@ class TestConnection(TestSchedulerBase):
# ----------------------------------------------------------
@
skipIf
(
settings
.
RUNNING_ON_CI
,
"Not runnable on the CI"
)
class
TestExecution
(
TestSchedulerBase
):
def
setUp
(
self
):
super
(
TestExecution
,
self
).
setUp
()
...
...
@@ -566,6 +572,7 @@ class TestExecution(TestSchedulerBase):
# ----------------------------------------------------------
@
skipIf
(
settings
.
RUNNING_ON_CI
,
"Not runnable on the CI"
)
class
TestCancellation
(
TestSchedulerBase
):
def
setUp
(
self
):
super
(
TestCancellation
,
self
).
setUp
()
...
...
@@ -662,7 +669,6 @@ class TestCancellation(TestSchedulerBase):
self
.
assertEqual
(
xp_to_finish
.
blocks
.
filter
(
status
=
Block
.
PROCESSING
).
count
(),
0
)
def
test_one_split_running
(
self
):
self
.
process
(
"user/user/single/1/single_sleep_4"
)
def
test_one_split_of_two_in_a_block_running
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment