Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Thomas Gambier
slapos
Commits
97379162
Commit
97379162
authored
Feb 13, 2023
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/erp5/test: expose _waitForActivities utility method
parent
b2ef7dc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
software/erp5/test/test/test_erp5.py
software/erp5/test/test/test_erp5.py
+9
-5
No files found.
software/erp5/test/test/test_erp5.py
View file @
97379162
...
...
@@ -27,6 +27,7 @@
import
contextlib
import
datetime
import
glob
import
http.client
import
json
...
...
@@ -450,10 +451,13 @@ class ZopeSkinsMixin:
@
classmethod
def
_setUpClass
(
cls
):
super
().
_setUpClass
()
param_dict
=
cls
.
getRootPartitionConnectionParameterDict
()
# wait for ERP5 to be ready and have processed all activities
# from initial setup
for
_
in
range
(
120
):
cls
.
_waitForActivities
()
@
classmethod
def
_waitForActivities
(
cls
,
timeout
=
datetime
.
timedelta
(
minutes
=
10
).
total_seconds
()):
"""Wait for ERP5 to be ready and have processed all activities.
"""
for
_
in
range
(
int
(
timeout
/
5
)):
with
cls
.
getXMLRPCClient
()
as
erp5_xmlrpc_client
:
try
:
if
erp5_xmlrpc_client
.
portal_activities
.
countMessage
()
==
0
:
...
...
@@ -464,7 +468,7 @@ class ZopeSkinsMixin:
pass
time
.
sleep
(
5
)
else
:
raise
AssertionError
(
"
ERP5 is not ready
"
)
raise
AssertionError
(
"
Timeout waiting for activities
"
)
@
classmethod
def
_getAuthenticatedZopeUrl
(
cls
,
path
,
family_name
=
'default'
):
...
...
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