From d57310bbc02088aa22b935cd430b49a917b68c19 Mon Sep 17 00:00:00 2001 From: Alexander Kukushkin Date: Wed, 13 Apr 2016 14:09:45 +0200 Subject: [PATCH] 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. --- features/basic_replication.feature | 4 ++-- features/cascading_replication.feature | 2 +- features/patroni_api.feature | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/features/basic_replication.feature b/features/basic_replication.feature index 86b8c42f..d2995e14 100644 --- a/features/basic_replication.feature +++ b/features/basic_replication.feature @@ -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 diff --git a/features/cascading_replication.feature b/features/cascading_replication.feature index 27f72eba..4a1672df 100644 --- a/features/cascading_replication.feature +++ b/features/cascading_replication.feature @@ -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 diff --git a/features/patroni_api.feature b/features/patroni_api.feature index 9216343e..31bbbdb2 100644 --- a/features/patroni_api.feature +++ b/features/patroni_api.feature @@ -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