Try to stabilize acceptance tests

This commit is contained in:
Alexander Kukushkin
2016-04-13 13:32:39 +02:00
parent f8bf1bb0ab
commit 15d30a2d35
2 changed files with 7 additions and 1 deletions
+4
View File
@@ -51,15 +51,19 @@ script:
if [[ $TEST_SUITE == "behave" ]]; then if [[ $TEST_SUITE == "behave" ]]; then
if [[ $pv != "3.4" ]]; then if [[ $pv != "3.4" ]]; then
echo Running acceptance tests using python${pv}
if ! PATH=.:$PATH $TEST_SUITE; then if ! PATH=.:$PATH $TEST_SUITE; then
grep . features/output/*/*postgres?.* grep . features/output/*/*postgres?.*
fi fi
fi fi
else else
echo Running unit tests using python${pv}
$TEST_SUITE test $TEST_SUITE test
$TEST_SUITE flake8 $TEST_SUITE flake8
fi fi
done done
set +e
after_success: after_success:
- coveralls - coveralls
- if [[ $TEST_SUITE != "behave" ]]; then python-codacy-coverage -r coverage.xml; fi - if [[ $TEST_SUITE != "behave" ]]; then python-codacy-coverage -r coverage.xml; fi
+3 -1
View File
@@ -40,12 +40,14 @@ Scenario: check the failover via the API
Then I receive a response code 200 Then I receive a response code 200
And postgres1 is a leader after 5 seconds And postgres1 is a leader after 5 seconds
And postgres1 role is the primary 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 And replication works from postgres1 to postgres0 after 15 seconds
Scenario: check the scheduled failover 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 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 Then I receive a response code 200
And postgres0 is a leader after 20 seconds 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 And replication works from postgres0 to postgres1 after 25 seconds