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
Hamza
erp5
Commits
0ad8ea27
Commit
0ad8ea27
authored
May 11, 2018
by
Xiaowu Zhang
Committed by
Rafael Monnerat
Jun 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5TypeTestCase&runUnitTest: set default conversion server retry count in test
/reviewed-on
nexedi/erp5!671
parent
7141fe5c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
product/ERP5Type/tests/ERP5TypeTestCase.py
product/ERP5Type/tests/ERP5TypeTestCase.py
+8
-0
product/ERP5Type/tests/runUnitTest.py
product/ERP5Type/tests/runUnitTest.py
+5
-0
No files found.
product/ERP5Type/tests/ERP5TypeTestCase.py
View file @
0ad8ea27
...
...
@@ -141,6 +141,11 @@ def _getConversionServerUrl():
'Using %s as conversion_server_url instead'
%
url
,
DeprecationWarning
)
return
url
def
_getConversionServerRetryCount
():
""" Return retry count for Conversion Server (Cloudooo)
"""
return
os
.
environ
.
get
(
'conversion_server_retry_count'
,
2
)
def
_getVolatileMemcachedServerDict
():
"""Returns a dict with hostname and port for volatile memcached Server
"""
...
...
@@ -952,6 +957,9 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
url
=
_getConversionServerUrl
()
pref
=
self
.
getDefaultSystemPreference
()
pref
.
_setPreferredDocumentConversionServerUrl
(
url
)
# set default retry count in test for network issue
retry_count
=
_getConversionServerRetryCount
()
pref
.
_setPreferredDocumentConversionServerRetry
(
retry_count
)
def
_updateMemcachedConfiguration
(
self
):
"""Update default memcached plugin configuration
...
...
product/ERP5Type/tests/runUnitTest.py
View file @
0ad8ea27
...
...
@@ -103,6 +103,8 @@ Options:
URL used to connect to document conversion server,
this value will stored at default preference.
Empty by default.
--conversion_server_retry_count=INTEGER
Retry Count for conversion error in case of network issue
--conversion_server_hostname=STRING
Hostname used to connect to conversion server (Oood),
this value will stored at default preference.
...
...
@@ -703,6 +705,7 @@ def main(argument_list=None):
"cmf_activity_sql_connection_string="
,
"extra_sql_connection_string_list="
,
"conversion_server_url="
,
"conversion_server_retry_count="
,
"conversion_server_port="
,
"conversion_server_hostname="
,
"volatile_memcached_server_port="
,
...
...
@@ -805,6 +808,8 @@ def main(argument_list=None):
os
.
environ
[
"update_business_templates"
]
=
"1"
elif
opt
==
"--conversion_server_url"
:
os
.
environ
[
"conversion_server_url"
]
=
arg
elif
opt
==
"--conversion_server_retry_count"
:
os
.
environ
[
"conversion_server_retry_count"
]
=
arg
elif
opt
==
"--conversion_server_hostname"
:
os
.
environ
[
"conversion_server_hostname"
]
=
arg
elif
opt
==
"--conversion_server_port"
:
...
...
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