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
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
alecs_myu
erp5
Commits
d6e0c107
Commit
d6e0c107
authored
Jul 31, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scalability: runScalabilityTestSuite: add more control for getConnection()
parent
773503ce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
erp5/util/scalability/runScalabilityTestSuite.py
erp5/util/scalability/runScalabilityTestSuite.py
+8
-3
No files found.
erp5/util/scalability/runScalabilityTestSuite.py
View file @
d6e0c107
...
@@ -20,10 +20,15 @@ from erp5.util.benchmark.performance_tester import PerformanceTester
...
@@ -20,10 +20,15 @@ from erp5.util.benchmark.performance_tester import PerformanceTester
from
erp5.util
import
taskdistribution
from
erp5.util
import
taskdistribution
from
erp5.util.testnode
import
Utils
from
erp5.util.testnode
import
Utils
MAX_GETTING_CONNECTION_TIME
=
60
*
5
def
getConnection
(
erp5_url
,
log
):
def
getConnection
(
erp5_url
,
log
):
while
True
:
start_time
=
time
.
time
()
count
=
0
while
MAX_GETTING_CONNECTION_TIME
>
time
.
time
()
-
start_time
:
try
:
try
:
count
=
count
+
1
parsed
=
urlparse
.
urlparse
(
erp5_url
)
parsed
=
urlparse
.
urlparse
(
erp5_url
)
host
=
"%s:%s"
%
(
parsed
.
hostname
,
str
(
parsed
.
port
))
host
=
"%s:%s"
%
(
parsed
.
hostname
,
str
(
parsed
.
port
))
if
parsed
.
scheme
==
'https'
:
if
parsed
.
scheme
==
'https'
:
...
@@ -33,9 +38,9 @@ def getConnection(erp5_url, log):
...
@@ -33,9 +38,9 @@ def getConnection(erp5_url, log):
else
:
else
:
raise
ValueError
(
"Protocol not implemented"
)
raise
ValueError
(
"Protocol not implemented"
)
except
:
except
:
log
(
"Can't get connect
t
ion to %s, we will retry."
%
erp5_url
)
log
(
"Can't get connection to %s, we will retry."
%
erp5_url
)
time
.
sleep
(
10
)
time
.
sleep
(
10
)
pass
raise
ValueError
(
"Cannot get new connection after %d try (for %s s)"
%
(
count
,
str
(
time
.
time
()
-
start_time
)))
MAX_INSTALLATION_TIME
=
1200
MAX_INSTALLATION_TIME
=
1200
def
waitFor0PendingActivities
(
erp5_url
,
log
):
def
waitFor0PendingActivities
(
erp5_url
,
log
):
...
...
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