Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
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
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
Xiaowu Zhang
slapos.toolbox
Commits
a3e6d8b9
Commit
a3e6d8b9
authored
Apr 25, 2014
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runner.resiliency.test: fix infinite recursion
resiliency.test.runner: fix waitForSoftwareRelease
parent
65257733
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
+23
-12
slapos/resiliencytest/suites/slaprunner.py
slapos/resiliencytest/suites/slaprunner.py
+23
-12
No files found.
slapos/resiliencytest/suites/slaprunner.py
View file @
a3e6d8b9
...
@@ -133,18 +133,29 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
...
@@ -133,18 +133,29 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
)
)
return
data
return
data
def
_waitForSoftwareBuild
(
self
):
#while self._connectToSlaprunner(resource='slapgridResult', data='position=0&log=').find('"software": true') is not -1:
def
_waitForSoftwareBuild
(
self
,
limit
=
5000
):
# self.logger.info('Software release is still building. Sleeping...')
"""
# time.sleep(15)
Wait until SR is built or limit reach 0
#self.logger.info('Software Release has been built / is no longer building.')
"""
try
:
def
getSRStatus
():
while
self
.
_connectToSlaprunner
(
resource
=
'isSRReady'
)
!=
"1"
:
"""
self
.
logger
.
info
(
'Software release is still building. Sleeping...'
)
Return current status (-1 in case of connection problem)
time
.
sleep
(
15
)
"""
except
(
NotHttpOkException
,
urllib2
.
HTTPError
):
try
:
# The nginx frontend might timeout before software release is finished.
return
self
.
_connectToSlaprunner
(
resource
=
'isSRReady'
)
self
.
_waitForSoftwareBuild
()
except
(
NotHttpOkException
,
urllib2
.
HTTPError
)
as
error
:
# The nginx frontend might timeout before software release is finished.
self
.
logger
.
warning
(
'Problem occured when contacting the server: %s'
%
error
)
return
-
1
status
=
getSRStatus
()
while
limit
>
0
and
status
!=
'1'
:
status
=
getSRStatus
()
limit
-=
1
self
.
logger
.
info
(
'Software release is still building. Sleeping...'
)
time
.
sleep
(
15
)
def
_buildSoftwareRelease
(
self
):
def
_buildSoftwareRelease
(
self
):
self
.
logger
.
info
(
'Building the Software Release...'
)
self
.
logger
.
info
(
'Building the Software Release...'
)
...
...
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