Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.core
Commits
3cc71593
Commit
3cc71593
authored
Oct 07, 2019
by
Samuel GAIST
Browse files
[test][bcp] Typo and code fixes
parent
c2b93143
Pipeline
#34097
passed with stage
in 40 minutes and 42 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
beat/core/test/test_bcp.py
View file @
3cc71593
...
...
@@ -173,7 +173,7 @@ class ZMQWorkerProcess(multiprocessing.Process):
# ----------------------------------------------------------
class
Ex
c
ecutionTestCase
(
unittest
.
TestCase
):
class
ExecutionTestCase
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
MAX_ITERATION_COUNT
=
int
(
os
.
environ
.
get
(
"BPC_MAX_ITERATION_COUNT"
,
DEFAULT_MAX_ITERATION_COUNT
)
...
...
@@ -232,7 +232,7 @@ class TestBroker(unittest.TestCase):
self
.
assertEqual
(
queue_messages
[
1
],
"gone"
)
class
TestBCP
(
Ex
c
ecutionTestCase
):
class
TestBCP
(
ExecutionTestCase
):
use_docker
=
False
docker_images_cache
=
None
...
...
@@ -352,16 +352,21 @@ class TestBCPDocker(TestBCP):
cls
.
host
=
Host
(
images_cache
=
cls
.
docker_images_cache
,
raise_on_errors
=
False
)
class
TestEx
c
ecutionProcess
(
Ex
c
ecutionTestCase
):
address
=
"ipc://execution_feed"
class
TestExecutionProcess
(
ExecutionTestCase
):
REMOTE_ADDRESS
=
"ipc://execution_feed"
def
tearDown
(
self
):
os
.
remove
(
self
.
address
.
split
(
"//"
)[
1
])
os
.
remove
(
self
.
REMOTE_ADDRESS
.
split
(
"//"
)[
1
])
def
setup_process
(
self
):
self
.
prepare_databases
(
CONFIGURATION1
)
process
=
ExecutionProcess
(
self
.
address
,
b
"1"
,
prefix
,
CONFIGURATION1
,
tmp_prefix
,
VERBOSE_BCP_LOGGING
self
.
REMOTE_ADDRESS
,
b
"1"
,
prefix
,
CONFIGURATION1
,
tmp_prefix
,
VERBOSE_BCP_LOGGING
,
)
process
.
start
()
return
process
...
...
@@ -370,7 +375,7 @@ class TestExcecutionProcess(ExcecutionTestCase):
ctx
=
zmq
.
Context
()
socket
=
ctx
.
socket
(
zmq
.
ROUTER
)
socket
.
linger
=
0
socket
.
bind
(
self
.
address
)
socket
.
bind
(
self
.
REMOTE_ADDRESS
)
poller
=
zmq
.
Poller
()
poller
.
register
(
socket
,
zmq
.
POLLIN
)
...
...
@@ -410,7 +415,9 @@ class TestExcecutionProcess(ExcecutionTestCase):
def
test_processor
(
self
):
poller
=
zmq
.
Poller
()
processor
=
BeatComputationProcessor
(
poller
,
self
.
address
,
VERBOSE_BCP_LOGGING
)
processor
=
BeatComputationProcessor
(
poller
,
self
.
REMOTE_ADDRESS
,
VERBOSE_BCP_LOGGING
)
process
=
self
.
setup_process
()
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment