HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings.
2.0.0-chaika
Hierarchical Cluster Engine Python language binding
ftest_DRCEManager.py
Go to the documentation of this file.
1
import
unittest
2
from
drce.DRCEManager
import
DRCEManager
3
from
drce.Commands
import
TaskExecuteRequest
4
from
drce.DRCEManager
import
HostParams
5
from
drce.DRCEManager
import
ConnectionTimeout, TransportInternalErr, CommandExecutorErr
6
7
8
class
TestDRCEManager
(unittest.TestCase):
9
10
def
setUp
(self):
11
hostParams =
HostParams
(
"10.0.0.10"
, 2323)
12
self.
drce_manager
=
DRCEManager
()
13
self.
drce_manager
.activate_host(hostParams)
14
15
16
def
test_send_executeCommand
(self):
17
#
18
request_id =
"101"
19
taskExecuteRequest =
TaskExecuteRequest
(request_id)
20
#set taskExecuteRequest fields
21
taskExecuteRequest.data.session =
"Some data"
22
timeout = 2000
23
24
try
:
25
task_response = self.
drce_manager
.
process
(taskExecuteRequest, timeout)
26
27
except
(ConnectionTimeout, TransportInternalErr, CommandExecutorErr)
as
err:
28
print
"Some err "
, err.message
29
30
31
print
task_response
ftests.ftest_DRCEManager.TestDRCEManager
Definition:
ftest_DRCEManager.py:8
ftests.ftest_DRCEManager.TestDRCEManager.setUp
def setUp(self)
Definition:
ftest_DRCEManager.py:10
drce.Commands
Definition:
Commands.py:1
drce.Commands.TaskExecuteRequest
wrapper for task request
Definition:
Commands.py:158
drce.DRCEManager
Definition:
DRCEManager.py:1
drce.DRCEManager.HostParams
HostParams
Definition:
DRCEManager.py:23
ftests.ftest_DRCEManager.TestDRCEManager.test_send_executeCommand
def test_send_executeCommand(self)
Definition:
ftest_DRCEManager.py:16
ftests.ftest_popen.process
process
Definition:
ftest_popen.py:37
ftests.ftest_DRCEManager.TestDRCEManager.drce_manager
drce_manager
Definition:
ftest_DRCEManager.py:12
drce.DRCEManager.DRCEManager
Definition:
DRCEManager.py:29
sources
hce
ftests
ftest_DRCEManager.py
Generated on Fri Nov 24 2017 18:54:00 for HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings. by
1.8.13