Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beat.core
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.core
Commits
bfa0be18
Commit
bfa0be18
authored
6 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
Fix dockerized tests
parent
87ffa07b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!32
Merge development branch 1.6.x
,
!19
New Conda-based CI/CD Pipelines
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
beat/core/test/test_docker_execution.py
+1
-0
1 addition, 0 deletions
beat/core/test/test_docker_execution.py
beat/core/test/test_docker_worker.py
+0
-77
0 additions, 77 deletions
beat/core/test/test_docker_worker.py
with
1 addition
and
77 deletions
beat/core/test/test_docker_execution.py
+
1
−
0
View file @
bfa0be18
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
# Tests for experiment execution within Docker containers
# Tests for experiment execution within Docker containers
from
..dock
import
Host
from
..dock
import
Host
from
..utils
import
cleanup
from
..execution
import
DockerExecutor
from
..execution
import
DockerExecutor
from
.test_execution
import
BaseExecutionMixIn
from
.test_execution
import
BaseExecutionMixIn
...
...
This diff is collapsed.
Click to expand it.
beat/core/test/test_docker_worker.py
+
0
−
77
View file @
bfa0be18
...
@@ -51,83 +51,6 @@ class TestOneWorkerDocker(TestOneWorker):
...
@@ -51,83 +51,6 @@ class TestOneWorkerDocker(TestOneWorker):
#----------------------------------------------------------
#----------------------------------------------------------
class
TestTwoWorkers
(
TestWorkerBase
):
def
setUp
(
self
):
self
.
tearDown
()
# In case another test failed badly during its setUp()
super
(
TestTwoWorkers
,
self
).
setUp
()
self
.
start_controller
()
self
.
start_worker
(
WORKER1
)
self
.
start_worker
(
WORKER2
)
self
.
wait_for_worker_connection
(
WORKER1
)
self
.
wait_for_worker_connection
(
WORKER2
)
def
_test_success_one_worker
(
self
,
worker_name
):
self
.
controller
.
execute
(
worker_name
,
1
,
CONFIGURATION1
)
message
=
None
while
message
is
None
:
message
=
self
.
controller
.
process
(
100
)
(
worker
,
status
,
job_id
,
data
)
=
message
self
.
assertEqual
(
worker
,
worker_name
)
self
.
assertEqual
(
status
,
WorkerController
.
DONE
)
self
.
assertEqual
(
job_id
,
1
)
result
=
simplejson
.
loads
(
data
[
0
])
self
.
assertEqual
(
result
[
'
status
'
],
0
)
def
test_success_worker1
(
self
):
self
.
_test_success_one_worker
(
WORKER1
)
def
test_success_worker2
(
self
):
self
.
_test_success_one_worker
(
WORKER2
)
def
test_success_both_workers
(
self
):
def
_check
(
worker
,
status
,
job_id
,
data
):
self
.
assertEqual
(
status
,
WorkerController
.
DONE
)
if
worker
==
WORKER1
:
self
.
assertEqual
(
job_id
,
1
)
else
:
self
.
assertEqual
(
worker
,
WORKER2
)
self
.
assertEqual
(
job_id
,
2
)
result
=
simplejson
.
loads
(
data
[
0
])
self
.
assertEqual
(
result
[
'
status
'
],
0
)
self
.
controller
.
execute
(
WORKER1
,
1
,
CONFIGURATION1
)
self
.
controller
.
execute
(
WORKER2
,
2
,
CONFIGURATION2
)
message
=
None
while
message
is
None
:
message
=
self
.
controller
.
process
(
100
)
(
worker1
,
status
,
job_id
,
data
)
=
message
_check
(
worker1
,
status
,
job_id
,
data
)
message
=
None
while
message
is
None
:
message
=
self
.
controller
.
process
(
100
)
(
worker2
,
status
,
job_id
,
data
)
=
message
_check
(
worker2
,
status
,
job_id
,
data
)
self
.
assertNotEqual
(
worker1
,
worker2
)
#----------------------------------------------------------
class
TestTwoWorkersDocker
(
TestTwoWorkers
):
class
TestTwoWorkersDocker
(
TestTwoWorkers
):
def
__init__
(
self
,
methodName
=
'
runTest
'
):
def
__init__
(
self
,
methodName
=
'
runTest
'
):
...
...
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