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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
preetwinder
erp5
Commits
67309098
Commit
67309098
authored
Jul 18, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testnode: update
parent
2b4a5b6b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
8 deletions
+21
-8
erp5/util/testnode/ScalabilityTestRunner.py
erp5/util/testnode/ScalabilityTestRunner.py
+10
-5
erp5/util/testnode/SlapOSControler.py
erp5/util/testnode/SlapOSControler.py
+1
-1
erp5/util/testnode/SlapOSMasterCommunicator.py
erp5/util/testnode/SlapOSMasterCommunicator.py
+10
-2
No files found.
erp5/util/testnode/ScalabilityTestRunner.py
View file @
67309098
...
...
@@ -46,8 +46,10 @@ from erp5.util import taskdistribution
# for dummy slapos answer
import
signal
MAX_INSTANCE_TIME
=
60
*
60
# 1 hour
MAX_CREATION_INSTANCE_TIME
=
60
*
5
# 5 minutes
# max time to instance changing state: 1 hour
MAX_INSTANCE_TIME
=
60
*
60
# max time to register instance to slapOSMaster: 5 minutes
MAX_CREATION_INSTANCE_TIME
=
60
*
5
class
ScalabilityTestRunner
():
def
__init__
(
self
,
testnode
):
...
...
@@ -355,12 +357,13 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
count
+=
1
test_result_line_proxy
=
test_result_proxy
.
start
(
exclude_list
)
if
test_result_line_proxy
==
None
:
self
.
log
(
"Already tested."
)
error
=
ValueError
(
"Test already tested."
)
#self.log("Already tested.")
#error = ValueError("Test already tested.")
self
.
log
(
"Warning::Test already tested."
)
break
;
# TODO: use only isAlive() and change test_result workflow on ERP5 Master side for the scalability case
self
.
log
(
"Test for count : %d is in a running state."
%
count
)
sel
)
f
.
log
(
"Test for count : %d is in a running state."
%
count
)
while
test_result_line_proxy
.
isRunning
()
and
test_result_proxy
.
isAlive
():
time
.
sleep
(
15
)
pass
...
...
@@ -394,7 +397,9 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
error
=
ValueError
(
"Test case is in an undeterminated state"
)
break
;
# Destroy instance
self
.
slapos_controler
.
destroyInstance
(
self
.
instance_title
)
self
.
_waitInstance
(
self
.
instance_title
,
'destroyed'
)
if
error
:
test_result_proxy
.
fail
()
...
...
erp5/util/testnode/SlapOSControler.py
View file @
67309098
...
...
@@ -150,7 +150,7 @@ class SlapOSControler(object):
'kvm.cfg', 'cluster', { "_" : "{'toto' : 'titi'}" } )
"""
self
.
log
(
'SlapOSControler : request'
)
self
.
log
(
'SlapOSControler : request
-->SlapOSMaster
'
)
current_intance_config
=
{
'software_type'
:
software_type
,
'software_configuration'
:
software_configuration
,
'computer_guid'
:
computer_guid
,
...
...
erp5/util/testnode/SlapOSMasterCommunicator.py
View file @
67309098
...
...
@@ -55,14 +55,14 @@ class SlapOSMasterCommunicator(object):
def
_getConnection
(
self
,
certificate_path
,
key_path
,
url
):
api_scheme
,
api_netloc
,
api_path
,
api_query
,
api_fragment
=
urlparse
.
urlsplit
(
url
)
self
.
log
(
"HTTPS Connection with: %s, cert=%s, key=%s"
%
(
api_netloc
,
key_path
,
certificate_path
))
#
self.log("HTTPS Connection with: %s, cert=%s, key=%s" %(api_netloc,key_path,certificate_path))
return
httplib
.
HTTPSConnection
(
api_netloc
,
key_file
=
key_path
,
cert_file
=
certificate_path
)
def
_curl
(
self
,
link
):
"""
'link' must look like : {'href':url,'type':content_type}
"""
self
.
log
(
"_curl with: url:%s content_type:%s"
%
(
link
[
'href'
],
link
[
'type'
]))
#
.log("_curl with: url:%s content_type:%s" %(link['href'], link['type']))
api_scheme
,
api_netloc
,
api_path
,
api_query
,
api_fragment
=
urlparse
.
urlsplit
(
link
[
'href'
])
# Try to use existing conection
try
:
...
...
@@ -184,4 +184,12 @@ class SlapOSMasterCommunicator(object):
if
self
.
hosting_subcriptions_dict
.
get
(
hosting_subscription_title
):
return
True
return
False
def
getAliveHostingSubscription
(
self
,
prefix_title
):
"""
Return list of dict information of alive hosting subscrtion
"""
return
[]
\ No newline at end of file
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