From 4e5691dda10e238c60bb613a732c3c1a27e9fa5d Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Mon, 9 Apr 2007 15:43:29 +0000 Subject: [PATCH] test skip-truncate and expect-sync options --- tests/londiste/data.sql | 15 +++++++++++++++ tests/londiste/run-tests.sh | 12 ++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/tests/londiste/data.sql b/tests/londiste/data.sql index 9bf6e819..5fe0ae9a 100644 --- a/tests/londiste/data.sql +++ b/tests/londiste/data.sql @@ -22,3 +22,18 @@ create index idx_data2_rand on data2 (id, data); create sequence test_seq; select setval('test_seq', 50); + + + +create table expect_test ( + dbname text primary key +); +insert into expect_test values (current_database()); + +create table skip_test ( + id serial not null, + dbname text not null, + primary key (id, dbname) +); +insert into skip_test (dbname) values (current_database()); + diff --git a/tests/londiste/run-tests.sh b/tests/londiste/run-tests.sh index fd2e160d..12f9f694 100755 --- a/tests/londiste/run-tests.sh +++ b/tests/londiste/run-tests.sh @@ -72,10 +72,9 @@ psql -c "vacuum analyze" provider mwait 30 "vacuuming" psql -c "vacuum analyze" provider -#echo "stopping script for a moment" -#$script conf/replic.ini -s -#mwait 15 "starting replica again" -#$script conf/replic.ini replay -d -v +$script conf/replic.ini provider add expect_test skip_test +$script conf/replic.ini subscriber add --expect-sync expect_test +$script conf/replic.ini subscriber add --skip-truncate skip_test mwait 90 "stopping tester skript" ./testing.py -s conf/tester.ini @@ -83,6 +82,11 @@ mwait 90 "stopping tester skript" #exit 0 mwait 20 "comparing tables" + +psql subscriber -c "select * from expect_test" +psql subscriber -c "select * from skip_test" + +# those should give errors on expect_test and skip_test tables, thats expected $script conf/replic.ini compare --force -v $script conf/replic.ini repair --force -v -- 2.39.5