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
Léo-Paul Géneau
erp5
Commits
1afcc6df
Commit
1afcc6df
authored
May 11, 2018
by
Xiaowu Zhang
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
3a811c0e
Changes
2
Hide 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 @
1afcc6df
...
@@ -141,6 +141,11 @@ def _getConversionServerUrl():
...
@@ -141,6 +141,11 @@ def _getConversionServerUrl():
'Using %s as conversion_server_url instead'
%
url
,
DeprecationWarning
)
'Using %s as conversion_server_url instead'
%
url
,
DeprecationWarning
)
return
url
return
url
def
_getConversionServerRetryCount
():
""" Return retry count for Conversion Server (Cloudooo)
"""
return
os
.
environ
.
get
(
'conversion_server_retry_count'
,
2
)
def
_getVolatileMemcachedServerDict
():
def
_getVolatileMemcachedServerDict
():
"""Returns a dict with hostname and port for volatile memcached Server
"""Returns a dict with hostname and port for volatile memcached Server
"""
"""
...
@@ -966,6 +971,9 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
...
@@ -966,6 +971,9 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
url
=
_getConversionServerUrl
()
url
=
_getConversionServerUrl
()
pref
=
self
.
getDefaultSystemPreference
()
pref
=
self
.
getDefaultSystemPreference
()
pref
.
_setPreferredDocumentConversionServerUrl
(
url
)
pref
.
_setPreferredDocumentConversionServerUrl
(
url
)
# set default retry count in test for network issue
retry_count
=
_getConversionServerRetryCount
()
pref
.
_setPreferredDocumentConversionServerRetry
(
retry_count
)
def
_updateMemcachedConfiguration
(
self
):
def
_updateMemcachedConfiguration
(
self
):
"""Update default memcached plugin configuration
"""Update default memcached plugin configuration
...
...
product/ERP5Type/tests/runUnitTest.py
View file @
1afcc6df
...
@@ -103,6 +103,8 @@ Options:
...
@@ -103,6 +103,8 @@ Options:
URL used to connect to document conversion server,
URL used to connect to document conversion server,
this value will stored at default preference.
this value will stored at default preference.
Empty by default.
Empty by default.
--conversion_server_retry_count=INTEGER
Retry Count for conversion error in case of network issue
--conversion_server_hostname=STRING
--conversion_server_hostname=STRING
Hostname used to connect to conversion server (Oood),
Hostname used to connect to conversion server (Oood),
this value will stored at default preference.
this value will stored at default preference.
...
@@ -703,6 +705,7 @@ def main(argument_list=None):
...
@@ -703,6 +705,7 @@ def main(argument_list=None):
"cmf_activity_sql_connection_string="
,
"cmf_activity_sql_connection_string="
,
"extra_sql_connection_string_list="
,
"extra_sql_connection_string_list="
,
"conversion_server_url="
,
"conversion_server_url="
,
"conversion_server_retry_count="
,
"conversion_server_port="
,
"conversion_server_port="
,
"conversion_server_hostname="
,
"conversion_server_hostname="
,
"volatile_memcached_server_port="
,
"volatile_memcached_server_port="
,
...
@@ -805,6 +808,8 @@ def main(argument_list=None):
...
@@ -805,6 +808,8 @@ def main(argument_list=None):
os
.
environ
[
"update_business_templates"
]
=
"1"
os
.
environ
[
"update_business_templates"
]
=
"1"
elif
opt
==
"--conversion_server_url"
:
elif
opt
==
"--conversion_server_url"
:
os
.
environ
[
"conversion_server_url"
]
=
arg
os
.
environ
[
"conversion_server_url"
]
=
arg
elif
opt
==
"--conversion_server_retry_count"
:
os
.
environ
[
"conversion_server_retry_count"
]
=
arg
elif
opt
==
"--conversion_server_hostname"
:
elif
opt
==
"--conversion_server_hostname"
:
os
.
environ
[
"conversion_server_hostname"
]
=
arg
os
.
environ
[
"conversion_server_hostname"
]
=
arg
elif
opt
==
"--conversion_server_port"
:
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