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
Sven Franck
erp5
Commits
fd6884a6
Commit
fd6884a6
authored
Jul 30, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scalability: runScalabilityTestSuite: Add while/try in getConnection
parent
8b1ee8ef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
12 deletions
+18
-12
erp5/util/scalability/runScalabilityTestSuite.py
erp5/util/scalability/runScalabilityTestSuite.py
+18
-12
No files found.
erp5/util/scalability/runScalabilityTestSuite.py
View file @
fd6884a6
...
...
@@ -19,7 +19,9 @@ from erp5.util import taskdistribution
from
erp5.util.testnode
import
Utils
def
getConnection
(
erp5_url
):
def
getConnection
(
erp5_url
,
log
):
while
True
:
try
:
parsed
=
urlparse
.
urlparse
(
erp5_url
)
host
=
"%s:%s"
%
(
parsed
.
hostname
,
str
(
parsed
.
port
))
if
parsed
.
scheme
==
'https'
:
...
...
@@ -28,12 +30,16 @@ def getConnection(erp5_url):
return
httplib
.
HTTPConnection
(
host
)
else
:
raise
ValueError
(
"Protocol not implemented"
)
except
:
log
(
"Can't get connecttion to %s, we will retry."
%
erp5_url
)
time
.
sleep
(
10
)
pass
MAX_INSTALLATION_TIME
=
1200
def
waitFor0PendingActivities
(
erp5_url
):
def
waitFor0PendingActivities
(
erp5_url
,
log
):
start_time
=
time
.
time
()
while
MAX_INSTALLATION_TIME
>
time
.
time
()
-
start_time
:
zope_connection
=
getConnection
(
erp5_url
)
zope_connection
=
getConnection
(
erp5_url
,
log
)
zope_connection
.
request
(
'GET'
,
'/erp5/portal_activities/getMessageList'
,
headers
=
header_dict
...
...
@@ -285,7 +291,7 @@ class ScalabilityLauncher(object):
error_count
=
1
# Waiting for 0-pending activities
waitFor0PendingActivities
(
self
.
__argumentNamespace
.
erp5_url
)
waitFor0PendingActivities
(
self
.
__argumentNamespace
.
erp5_url
,
self
.
log
)
# Here call a runScalabilityTest ( placed on product/ERP5Type/tests ) ?
...
...
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