From 15d30a2d359de13bf253229bec72666125d38051 Mon Sep 17 00:00:00 2001 From: Alexander Kukushkin Date: Wed, 13 Apr 2016 08:32:24 +0200 Subject: [PATCH] Try to stabilize acceptance tests --- .travis.yml | 4 ++++ features/patroni_api.feature | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 93c7abcb..3e43240f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,15 +51,19 @@ script: if [[ $TEST_SUITE == "behave" ]]; then if [[ $pv != "3.4" ]]; then + echo Running acceptance tests using python${pv} if ! PATH=.:$PATH $TEST_SUITE; then grep . features/output/*/*postgres?.* fi fi else + echo Running unit tests using python${pv} $TEST_SUITE test $TEST_SUITE flake8 fi done + + set +e after_success: - coveralls - if [[ $TEST_SUITE != "behave" ]]; then python-codacy-coverage -r coverage.xml; fi diff --git a/features/patroni_api.feature b/features/patroni_api.feature index d3b3130d..75d44304 100644 --- a/features/patroni_api.feature +++ b/features/patroni_api.feature @@ -40,12 +40,14 @@ Scenario: check the failover via the API Then I receive a response code 200 And postgres1 is a leader after 5 seconds And postgres1 role is the primary after 5 seconds - And postgres0 role is the secondary after 5 seconds + And postgres0 role is the secondary after 10 seconds And replication works from postgres1 to postgres0 after 15 seconds Scenario: check the scheduled failover Given I issue a scheduled failover at http://127.0.0.1:8009 from postgres1 to postgres0 in 10 seconds Then I receive a response code 200 And postgres0 is a leader after 20 seconds + And postgres0 role is the primary after 5 seconds + And postgres1 role is the secondary after 10 seconds And replication works from postgres0 to postgres1 after 25 seconds