diff options
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/pg_rewind/RewindTest.pm | 7 | ||||
-rw-r--r-- | src/bin/pg_rewind/t/001_basic.pl | 4 | ||||
-rw-r--r-- | src/bin/pg_rewind/t/002_databases.pl | 4 | ||||
-rw-r--r-- | src/bin/pg_rewind/t/003_extrafiles.pl | 4 | ||||
-rw-r--r-- | src/bin/pg_rewind/t/004_pg_xlog_symlink.pl | 4 |
5 files changed, 13 insertions, 10 deletions
diff --git a/src/bin/pg_rewind/RewindTest.pm b/src/bin/pg_rewind/RewindTest.pm index 6649c22b4f6..76ce295cef7 100644 --- a/src/bin/pg_rewind/RewindTest.pm +++ b/src/bin/pg_rewind/RewindTest.pm @@ -114,9 +114,10 @@ sub check_query sub setup_cluster { + my $extra_name = shift; # Initialize master, data checksums are mandatory - $node_master = get_new_node('master'); + $node_master = get_new_node('master' . ($extra_name ? "_${extra_name}" : '')); $node_master->init(allows_streaming => 1); } @@ -130,7 +131,9 @@ sub start_master sub create_standby { - $node_standby = get_new_node('standby'); + my $extra_name = shift; + + $node_standby = get_new_node('standby' . ($extra_name ? "_${extra_name}" : '')); $node_master->backup('my_backup'); $node_standby->init_from_backup($node_master, 'my_backup'); my $connstr_master = $node_master->connstr(); diff --git a/src/bin/pg_rewind/t/001_basic.pl b/src/bin/pg_rewind/t/001_basic.pl index 1764b17c907..736f34eae3f 100644 --- a/src/bin/pg_rewind/t/001_basic.pl +++ b/src/bin/pg_rewind/t/001_basic.pl @@ -9,7 +9,7 @@ sub run_test { my $test_mode = shift; - RewindTest::setup_cluster(); + RewindTest::setup_cluster($test_mode); RewindTest::start_master(); # Create a test table and insert a row in master. @@ -28,7 +28,7 @@ sub run_test master_psql("CHECKPOINT"); - RewindTest::create_standby(); + RewindTest::create_standby($test_mode); # Insert additional data on master that will be replicated to standby master_psql("INSERT INTO tbl1 values ('in master, before promotion')"); diff --git a/src/bin/pg_rewind/t/002_databases.pl b/src/bin/pg_rewind/t/002_databases.pl index 20bdb4ab59d..37cdd712f31 100644 --- a/src/bin/pg_rewind/t/002_databases.pl +++ b/src/bin/pg_rewind/t/002_databases.pl @@ -9,13 +9,13 @@ sub run_test { my $test_mode = shift; - RewindTest::setup_cluster(); + RewindTest::setup_cluster($test_mode); RewindTest::start_master(); # Create a database in master. master_psql('CREATE DATABASE inmaster'); - RewindTest::create_standby(); + RewindTest::create_standby($test_mode); # Create another database, the creation is replicated to the standby master_psql('CREATE DATABASE beforepromotion'); diff --git a/src/bin/pg_rewind/t/003_extrafiles.pl b/src/bin/pg_rewind/t/003_extrafiles.pl index cedde1409bc..2433a4aab6f 100644 --- a/src/bin/pg_rewind/t/003_extrafiles.pl +++ b/src/bin/pg_rewind/t/003_extrafiles.pl @@ -14,7 +14,7 @@ sub run_test { my $test_mode = shift; - RewindTest::setup_cluster(); + RewindTest::setup_cluster($test_mode); RewindTest::start_master(); my $test_master_datadir = $node_master->data_dir; @@ -27,7 +27,7 @@ sub run_test append_to_file "$test_master_datadir/tst_both_dir/both_subdir/both_file3", "in both3"; - RewindTest::create_standby(); + RewindTest::create_standby($test_mode); # Create different subdirs and files in master and standby my $test_standby_datadir = $node_standby->data_dir; diff --git a/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl b/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl index 12950ea1ca6..feadaa6a0ff 100644 --- a/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl +++ b/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl @@ -26,7 +26,7 @@ sub run_test my $master_xlogdir = "${TestLib::tmp_check}/xlog_master"; rmtree($master_xlogdir); - RewindTest::setup_cluster(); + RewindTest::setup_cluster($test_mode); my $test_master_datadir = $node_master->data_dir; @@ -43,7 +43,7 @@ sub run_test master_psql("CHECKPOINT"); - RewindTest::create_standby(); + RewindTest::create_standby($test_mode); # Insert additional data on master that will be replicated to standby master_psql("INSERT INTO tbl1 values ('in master, before promotion')"); |