Skip to content

Commit

Permalink
extend timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
asmacdo committed Jan 15, 2020
1 parent b2cbb35 commit d5db444
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions hack/tests/e2e-ansible.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ test_operator() {
fi

header_text "verify that the metrics endpoint exists (Port 8383)"
if ! timeout 1m bash -c -- "until kubectl run --attach --rm --restart=Never test-metrics --image=$metrics_test_image -- curl -sfo /dev/null http://memcached-operator-metrics:8383/metrics; do sleep 1; done";
if ! timeout 90s bash -c -- "until kubectl run --attach --rm --restart=Never test-metrics --image=$metrics_test_image -- curl -sfo /dev/null http://memcached-operator-metrics:8383/metrics; do sleep 1; done";
then
error_text "FAIL: Failed to verify that metrics endpoint exists"
operator_logs
Expand All @@ -93,7 +93,7 @@ test_operator() {
fi

header_text "verify that metrics reflect cr creation"
if ! timeout 1m bash -c -- "until kubectl run -it --rm --restart=Never test-metrics --image=$metrics_test_image -- curl http://memcached-operator-metrics:8686/metrics | grep example-memcached; do sleep 1; done";
if ! timeout 90s bash -c -- "until kubectl run -it --rm --restart=Never test-metrics --image=$metrics_test_image -- curl http://memcached-operator-metrics:8686/metrics | grep example-memcached; do sleep 1; done";
then
error_text "FAIL: Failed to verify custom resource metrics"
operator_logs
Expand Down
4 changes: 2 additions & 2 deletions internal/scaffold/ansible/molecule_test_cluster_playbook.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const moleculeTestClusterPlaybookAnsibleTmpl = `---
debug:
msg: "{{ lookup('k8s', group='[[.Resource.FullGroup]]', api_version='[[.Resource.Version]]', kind='[[.Resource.Kind]]', namespace=namespace, resource_name=custom_resource.metadata.name) }}"
- name: Wait 2m for reconciliation to run
- name: Wait 4m for reconciliation to run
k8s_info:
api_version: '[[.Resource.Version]]'
kind: '[[.Resource.Kind]]'
Expand All @@ -68,7 +68,7 @@ const moleculeTestClusterPlaybookAnsibleTmpl = `---
register: reconcile_cr
until:
- "'Successful' in (reconcile_cr | json_query('resources[].status.conditions[].reason'))"
delay: 12
delay: 24
retries: 10
- import_playbook: '{{ playbook_dir }}/../default/asserts.yml'
Expand Down
4 changes: 2 additions & 2 deletions internal/scaffold/ansible/molecule_test_local_playbook.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const moleculeTestLocalPlaybookAnsibleTmpl = `---
namespace: '{{ namespace }}'
definition: '{{ custom_resource }}'
- name: Wait 2m for reconciliation to run
- name: Wait 4m for reconciliation to run
k8s_info:
api_version: '{{ custom_resource.apiVersion }}'
kind: '{{ custom_resource.kind }}'
Expand All @@ -110,7 +110,7 @@ const moleculeTestLocalPlaybookAnsibleTmpl = `---
register: cr
until:
- "'Successful' in (cr | json_query('resources[].status.conditions[].reason'))"
delay: 12
delay: 24
retries: 10
rescue:
- name: debug cr
Expand Down
4 changes: 2 additions & 2 deletions test/ansible-inventory/molecule/test-local/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
namespace: '{{ namespace }}'
definition: "{{ custom_resource }}"

- name: Wait 2m for reconciliation to run
- name: Wait 4m for reconciliation to run
k8s_info:
api_version: '{{ custom_resource.apiVersion }}'
kind: '{{ custom_resource.kind }}'
Expand All @@ -68,7 +68,7 @@
register: cr
until:
- "'Successful' in (cr | json_query('resources[].status.conditions[].reason'))"
delay: 12
delay: 24
retries: 10

- import_playbook: asserts.yml
2 changes: 1 addition & 1 deletion test/ansible-memcached/asserts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
debug:
var: service
until: service
retries: 12
retries: 24
delay: 10
vars:
service: '{{ lookup("k8s",
Expand Down

0 comments on commit d5db444

Please sign in to comment.