Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
141
Merge Requests
141
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
4e70b15d
Commit
4e70b15d
authored
Jun 26, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util: testnode up
parent
50a05e70
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
1 deletion
+50
-1
erp5/util/taskdistribution/__init__.py
erp5/util/taskdistribution/__init__.py
+24
-0
erp5/util/testnode/ScalabilityTestRunner.py
erp5/util/testnode/ScalabilityTestRunner.py
+26
-1
No files found.
erp5/util/taskdistribution/__init__.py
View file @
4e70b15d
...
...
@@ -138,6 +138,30 @@ class TestResultLineProxy(RPCRetry):
def
name
(
self
):
return
self
.
_name
def
isRunning
(
self
):
"""
Return : boolean
"""
return
bool
(
self
.
_retryRPC
(
'isTestCaseRunning'
,
[
self
.
_test_result_line_path
]))
def
isFailed
(
self
):
"""
Return : boolean
"""
return
bool
(
self
.
_retryRPC
(
'isTestCaseFailed'
,
[
self
.
_test_result_line_path
]))
def
isCompleted
(
self
):
"""
Return : boolean
"""
return
bool
(
self
.
_retryRPC
(
'isTestCaseCompleted'
,
[
self
.
_test_result_line_path
]))
def
isCancelled
(
self
):
"""
Return : boolean
"""
return
bool
(
self
.
_retryRPC
(
'isTestCaseCancelled'
,
[
self
.
_test_result_line_path
]))
def
stop
(
self
,
test_count
=
None
,
error_count
=
None
,
failure_count
=
None
,
skip_count
=
None
,
duration
=
None
,
date
=
None
,
command
=
None
,
stdout
=
None
,
stderr
=
None
,
html_test_result
=
None
,
**
kw
):
...
...
erp5/util/testnode/ScalabilityTestRunner.py
View file @
4e70b15d
...
...
@@ -298,7 +298,32 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
count
+=
1
test_result_line_proxy
=
test_result_proxy
.
start
(
exclude_list
)
self
.
log
(
"Test for count : %d is in a running state."
%
count
)
# create result line
while
test_result_line_proxy
.
isRunning
()
and
test_result_proxy
.
isAlive
():
time
.
sleep
(
10
)
pass
if
test_result_line_proxy
.
isCompleted
():
self
.
log
(
"Test completed."
)
pass
elif
not
test_result_proxy
.
isAlive
():
self
.
log
(
"Test cancelled."
)
# Here do somethig with instances
raise
ValueError
(
"Test cancelled"
)
elif
test_result_line_proxy
.
isFailed
():
self
.
log
(
"Test failed."
)
# Here do somethig with instances
raise
ValueError
(
"Test failed"
)
elif
test_result_line_proxy
.
isCancelled
():
self
.
log
(
"Test cancelled."
)
# Here do somethig with instances
raise
ValueError
(
"Test has been cancelled"
)
elif
test_result_line_proxy
.
isRunning
():
self
.
log
(
"Test always running after max time elapsed."
)
# Here do somethig with instances
raise
ValueError
(
"Max time for this test case is elapsed."
)
else
:
self
.
log
(
"Test in a undeterminated state."
)
raise
ValueError
(
"Test case is in an undeterminated state"
)
return
{
'status_code'
:
0
}
def
_cleanUpNodesInformation
(
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