Skip to content

Commit

Permalink
Make circleci faster - fix intermittent tests due to slow execution (#90
Browse files Browse the repository at this point in the history
)

* try 17.10.0-ce

* remove wait on selenium start

* fix copying log output

* add zserver logs to artifacts

* fix strange warning/error contents.form.tostring_innerhtml

* improve test in tostring_innerhtml

* improve test on tostring_innerhtml

* final fix for def tostring_innerhtml(root):
  • Loading branch information
djay committed Nov 9, 2017
1 parent 7ea9320 commit 01d480a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .circleci/config.yml
Expand Up @@ -13,7 +13,7 @@ jobs:
- checkout
- setup_remote_docker:
docker_layer_caching: true
version: 17.10.0-ce-git
version: 17.10.0-ce
- run:
name: Install dependencies
command: |
Expand Down Expand Up @@ -55,13 +55,14 @@ jobs:
export NODES=1 VIDEO=false
mkdir -p test; chown 1000:1000 test; ls -al test
docker-compose -f docker-compose.test.yml -p grid up -d selenium
docker exec grid_selenium_1 wait_all_done 30s
#docker exec grid_selenium_1 wait_all_done 30s
docker-compose -f docker-compose.test.yml -p grid up --abort-on-container-exit --exit-code-from=plominotest plominotest
- run:
name: Clean up tests
when: always
command: |
docker cp grid_plominotest_1:/buildout/parts/test /app
docker cp grid_plominotest_1:/plone/instance/parts/test /app
docker cp grid_plominotest_1:/plone/instance/var/log /app
ls -al /app/test
docker-compose -f docker-compose.test.yml -p grid down
- store_artifacts:
Expand Down
4 changes: 3 additions & 1 deletion src/Products/CMFPlomino/contents/form.py
Expand Up @@ -2582,6 +2582,8 @@ def tostring_innerhtml(root):
""" pyquery doesn't handle remove or replace_with well when you are dealing
with fragments
"""
if not root:
if root is None or (str(root)=="" and root.text == ""):
return ''
if not hasattr(root,'iterchildren'):
return str(root)
return (root.text or '') + ''.join([tostring(child) for child in root.iterchildren()])

0 comments on commit 01d480a

Please sign in to comment.