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
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Roque
erp5
Commits
5c0f49d1
Commit
5c0f49d1
authored
Jul 17, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! testnode: ScalabilityTestRunner: Use SlapOSMasterCommunicator
parent
9cbd5218
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
24 deletions
+10
-24
erp5/util/testnode/ScalabilityTestRunner.py
erp5/util/testnode/ScalabilityTestRunner.py
+10
-24
No files found.
erp5/util/testnode/ScalabilityTestRunner.py
View file @
5c0f49d1
...
...
@@ -173,15 +173,12 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
# this simulate a SlapOS answer
return
self
.
simulateSlapOSAnswer
()
def
isInstanceReady
(
self
,
instance_title
):
def
isInstanceReady
(
self
,
instance_title
,
state
):
"""
Return true if the specified instance is ready.
This method should communicates with SlapOS Master.
"""
# TODO : implement -> communication with SlapOS master
# this simulate a SlapOS answer
#return self.simulateSlapOSAnswer()
return
self
.
slapos_communicator
.
isInstanceCorrectly
(
instance_title
,
'started'
)
return
self
.
slapos_communicator
.
isInstanceCorrectly
(
instance_title
,
state
)
def
remainSoftwareToInstall
(
self
):
"""
...
...
@@ -207,15 +204,11 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
return
{
'status_code'
:
0
}
# Used to simulate slapOS answer
def
_waitInstance
(
self
,
instance_title
):
self
.
log
(
"Master testnode is waiting for a (dummy) SlapOS Master answer,
\
(kill -10 %s) to continue..."
,
str
(
os
.
getpid
()))
self
.
_prepareDummySlapOSAnswer
()
while
(
not
self
.
isInstanceReady
(
instance_title
)):
time
.
sleep
(
5
)
def
_waitInstance
(
self
,
instance_title
,
state
):
self
.
log
(
"Wait for instance state: %s"
%
state
)
while
(
not
self
.
isInstanceReady
(
instance_title
,
state
)):
time
.
sleep
(
15
)
pass
self
.
_comeBackFromDummySlapOS
()
self
.
log
(
"Answer received."
)
def
prepareSlapOSForTestSuite
(
self
,
node_test_suite
):
"""
...
...
@@ -303,8 +296,7 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
self
.
_createInstance
(
self
.
reachable_profile
,
configuration_list
[
0
],
self
.
instance_title
,
node_test_suite
.
test_result
,
node_test_suite
.
test_suite
)
self
.
log
(
"Waiting for instance creation.."
)
#self._waitInstance(self.instance_title)
self
.
slapos_communicator
.
isInstanceCorrectly
(
self
.
self
.
instance_title
,
'started'
)
self
.
_waitInstance
(
self
.
instance_title
,
'started'
)
self
.
log
(
"Scalability instance requested"
)
""" except:
self.log("Unable to launch instance")
...
...
@@ -332,22 +324,16 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
# Stop instance
self
.
log
(
"Instance state: %s"
,
self
.
slapos_controler
.
getInstanceState
(
self
.
instance_title
))
self
.
slapos_controler
.
stopInstance
(
self
.
instance_title
)
self
.
log
(
"Waiting for instance stop.."
)
#self._waitInstance(self.instance_title)
self
.
slapos_communicator
.
isInstanceCorrectly
(
self
.
instance_title
,
'stopped'
)
self
.
_waitInstance
(
self
.
instance_title
,
'stopped'
)
# Update instance XML configuration
self
.
log
(
"Instance state: %s"
,
self
.
slapos_controler
.
getInstanceState
(
self
.
instance_title
))
self
.
_updateInstanceXML
(
configuration
,
self
.
instance_title
,
node_test_suite
.
test_result
,
node_test_suite
.
test_suite
)
self
.
log
(
"Waiting for XML updating instance ready.."
)
#self._waitInstance(self.instance_title)
self
.
slapos_communicator
.
isInstanceCorrectly
(
self
.
instance_title
,
'started'
)
self
.
_waitInstance
(
self
.
instance_title
,
'started'
)
# Start instance
self
.
log
(
"Instance state: %s"
,
self
.
slapos_controler
.
getInstanceState
(
self
.
instance_title
))
self
.
slapos_controler
.
startInstance
(
self
.
instance_title
)
self
.
log
(
"Waiting for instance start.."
)
self
.
slapos_communicator
.
isInstanceCorrectly
(
self
.
instance_title
,
'started'
)
#self._waitInstance(self.instance_title)
self
.
_waitInstance
(
self
.
instance_title
,
'started'
)
# Start only the current test
exclude_list
=
[
x
for
x
in
test_list
if
x
!=
test_list
[
count
]]
...
...
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