cors-tests: Increase timeouts for setup operations
Drive-bys: * Only copy outputs when there are outputs to copy * Print tracebacks when there's an issue running a selenium driver Change-Id: I0807af4525a13a30baf27ada40eeabe311b44296
This commit is contained in:
parent
c2f619129c
commit
1afad5c492
@ -22,6 +22,7 @@ import os.path
|
|||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
import traceback
|
||||||
|
|
||||||
from six.moves import urllib
|
from six.moves import urllib
|
||||||
from six.moves import socketserver
|
from six.moves import socketserver
|
||||||
@ -101,7 +102,7 @@ def setup(args):
|
|||||||
ENV['OS_AUTH_URL'],
|
ENV['OS_AUTH_URL'],
|
||||||
ENV['OS_USERNAME'],
|
ENV['OS_USERNAME'],
|
||||||
ENV['OS_PASSWORD'],
|
ENV['OS_PASSWORD'],
|
||||||
timeout=5)
|
timeout=30) # We've seen request times as high as 7-8s in the gate
|
||||||
cluster_info = conn.get_capabilities()
|
cluster_info = conn.get_capabilities()
|
||||||
conn.put_container('private', {
|
conn.put_container('private', {
|
||||||
'X-Container-Read': '',
|
'X-Container-Read': '',
|
||||||
@ -180,6 +181,9 @@ def run(args, url):
|
|||||||
try:
|
try:
|
||||||
browser = driver()
|
browser = driver()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
if not ('needs to be in PATH' in str(e) or
|
||||||
|
'SafariDriver was not found' in str(e)):
|
||||||
|
traceback.print_exc()
|
||||||
results.append(('SKIP', browser_name, str(e).strip()))
|
results.append(('SKIP', browser_name, str(e).strip()))
|
||||||
continue
|
continue
|
||||||
ran_one = True
|
ran_one = True
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
become: true
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: Check for geckodriver log
|
||||||
|
stat:
|
||||||
|
path: '{{ ansible_env.HOME }}/geckodriver.log'
|
||||||
|
register: geckodriver_output
|
||||||
|
|
||||||
- name: Copy geckodriver log from worker nodes to executor node
|
- name: Copy geckodriver log from worker nodes to executor node
|
||||||
synchronize:
|
synchronize:
|
||||||
src: '{{ ansible_env.HOME }}/geckodriver.log'
|
src: '{{ ansible_env.HOME }}/geckodriver.log'
|
||||||
@ -8,6 +13,12 @@
|
|||||||
mode: pull
|
mode: pull
|
||||||
copy_links: true
|
copy_links: true
|
||||||
verify_host: true
|
verify_host: true
|
||||||
|
when: geckodriver_output.stat.exists == true
|
||||||
|
|
||||||
|
- name: Check for CORS test output
|
||||||
|
stat:
|
||||||
|
path: '{{ ansible_env.HOME }}/cors-test-results.txt'
|
||||||
|
register: test_output
|
||||||
|
|
||||||
- name: Copy CORS tests output from worker nodes to executor node
|
- name: Copy CORS tests output from worker nodes to executor node
|
||||||
synchronize:
|
synchronize:
|
||||||
@ -16,6 +27,7 @@
|
|||||||
mode: pull
|
mode: pull
|
||||||
copy_links: true
|
copy_links: true
|
||||||
verify_host: true
|
verify_host: true
|
||||||
|
when: test_output.stat.exists == true
|
||||||
|
|
||||||
- zuul_return:
|
- zuul_return:
|
||||||
data:
|
data:
|
||||||
@ -23,3 +35,4 @@
|
|||||||
artifacts:
|
artifacts:
|
||||||
- name: CORS test results
|
- name: CORS test results
|
||||||
url: cors-test-results.txt
|
url: cors-test-results.txt
|
||||||
|
when: test_output.stat.exists == true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user