Fix one more corner-case

It could take up to 10 seconds to create replication slot.
In addition to that when replica fails to connect to the master via
streaming replication it doesn't retry immediately, but with some
timeout (5 seconds). 10 + 5 == 15 what causes replication check
scenarios fail.
This commit is contained in:
Alexander Kukushkin
2016-04-13 14:09:45 +02:00
parent 946d8ef4f2
commit d57310bbc0
3 changed files with 5 additions and 5 deletions

View File

@@ -6,7 +6,7 @@ Feature: basic replication
And postgres0 is a leader after 10 seconds
And I start postgres1
When I add the table foo to postgres0
Then table foo is present on postgres1 after 15 seconds
Then table foo is present on postgres1 after 20 seconds
Scenario: check the basic failover
When I kill postgres0
@@ -14,4 +14,4 @@ Feature: basic replication
When I start postgres0
Then postgres0 role is the secondary after 15 seconds
When I add the table bar to postgres1
Then table bar is present on postgres0 after 15 seconds
Then table bar is present on postgres0 after 20 seconds

View File

@@ -5,7 +5,7 @@ Scenario: check a base backup and streaming replication from a replica
Given I start postgres0
And postgres0 is a leader after 10 seconds
And I configure and start postgres1 with a tag clonefrom true
And replication works from postgres0 to postgres1 after 15 seconds
And replication works from postgres0 to postgres1 after 20 seconds
And I create label with "postgres0" in postgres0 data directory
And I create label with "postgres1" in postgres1 data directory
And I configure and start postgres2 with a tag replicatefrom postgres1

View File

@@ -22,7 +22,7 @@ Scenario: check API requests on a stand-alone server
Scenario: check API requests for the primary-replica pair
Given I start postgres1
And replication works from postgres0 to postgres1 after 15 seconds
And replication works from postgres0 to postgres1 after 20 seconds
When I issue a GET request to http://127.0.0.1:8009/replica
Then I receive a response code 200
And I receive a response state running
@@ -41,7 +41,7 @@ Scenario: check the failover via the API
And postgres1 is a leader after 5 seconds
And postgres1 role is the primary 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 20 seconds
Scenario: check the scheduled failover
Given I issue a scheduled failover at http://127.0.0.1:8009 from postgres1 to postgres0 in 1 seconds