Commit 7a91e3f2 authored by Xiaowu Zhang's avatar Xiaowu Zhang

run-zelenium-test: remove failed activities and reindex

parent 3c56c310
......@@ -108,7 +108,48 @@ def main():
"&resultsUrl=../getId" \
"&__ac_name=%s" \
"&__ac_password=%s" % (args.remote_access_url, {{ repr(user) }}, {{ repr(password) }})
#wait for bt5 to be installed
wait_url = args.remote_access_url + ('/erp5/portal_skins/erp5_ui_test_core?&__ac_name=%s&__ac_password=%s' %( {{ repr(user) }}, {{ repr(password) }}))
while 1:
try:
response = urlopen(wait_url)
try:
if response.code == 200:
break
finally:
response.close()
except Exception:
traceback.print_exc()
time.sleep(100)
#clean activities and reindex to remove failed activities
wait_url = args.remote_access_url + ('/erp5/portal_activities/manageClearActivities?&__ac_name=%s&__ac_password=%s' %( {{ repr(user) }}, {{ repr(password) }}))
while 1:
try:
response = urlopen(wait_url)
try:
if response.code == 200:
break
finally:
response.close()
except Exception:
traceback.print_exc()
time.sleep(100)
wait_url = args.remote_access_url + ('/erp5/ERP5Site_reindexAll?clear_catalog=1?&__ac_name=%s&__ac_password=%s' %( {{ repr(user) }}, {{ repr(password) }}))
while 1:
try:
response = urlopen(wait_url)
try:
if response.code == 200:
break
finally:
response.close()
except Exception:
traceback.print_exc()
time.sleep(100)
# Wait until all activities are finished...
wait_url = args.remote_access_url + '/erp5/Zuite_waitForActivities'
while 1:
......@@ -123,7 +164,7 @@ def main():
response.close()
except Exception:
traceback.print_exc()
time.sleep(10)
time.sleep(100)
tool = taskdistribution.TaskDistributor(portal_url=args.master_url)
browser = webdriver.Remote(appium_url, capabilities)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment