Skip to content

Commit

Permalink
tests-openshift: race condition in getting pod IP
Browse files Browse the repository at this point in the history
After successful pod scale to 2, it takes some time to have the
replica ready, and it probably takes some time to get allocated
the IP address.  So rather wait for the pod to be ready before we
expect that the IP is available.

We could in future make the 'ct_os_get_pod_ip' accept some option
which would wait till the IP is available.
  • Loading branch information
praiskup authored and omron93 committed Feb 15, 2018
1 parent 212c4fc commit 7578ec7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/run-openshift
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ function test_postgresql_replication() {
ct_os_wait_rc_ready "$slave_service_name" 60
slave_name=$(ct_os_get_pod_name "$slave_service_name")
for slave in $slave_name; do
ct_os_wait_pod_ready "$slave" 60
slave_ip=$(ct_os_get_pod_ip "$slave")
check_postgresql_data "$image_name" "$user" "$pass" "$db" "$slave_ip"
done
Expand Down

0 comments on commit 7578ec7

Please sign in to comment.