Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beat.web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
beat
beat.web
Commits
18cca41c
Commit
18cca41c
authored
6 years ago
by
Samuel GAIST
Browse files
Options
Downloads
Patches
Plain Diff
[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
!275
ZMQ refactoring
Pipeline
#27962
passed
6 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
beat/web/utils/tests/test_scheduling.py
+7
-1
7 additions, 1 deletion
beat/web/utils/tests/test_scheduling.py
with
7 additions
and
1 deletion
beat/web/utils/tests/test_scheduling.py
+
7
−
1
View file @
18cca41c
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment