summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Berg2013-09-19 09:10:44 +0000
committerChristoph Berg2013-09-19 09:10:44 +0000
commit3d5ff343d2ed8ebf8ef4bf786f037ad07938af28 (patch)
treed4c9d0c3b772ae844f3a00e99fde0b7cfcdce9d2
parentbf5b6900aa031464616299934b7447f4874d5747 (diff)
t/02_last_vacuum.t: Reorder commit calls to make test more stable
-rw-r--r--t/02_last_vacuum.t10
1 files changed, 4 insertions, 6 deletions
diff --git a/t/02_last_vacuum.t b/t/02_last_vacuum.t
index d5d8ab431..2df8b61dd 100644
--- a/t/02_last_vacuum.t
+++ b/t/02_last_vacuum.t
@@ -57,21 +57,19 @@ for ('-1 second',
$t = qq{$S flags no-match-user};
like ($cp->run(q{-w 0 --includeuser=gandalf}), qr{No matching.*user}, $t);
-$dbh->{AutoCommit} = 1;
-$dbh->do('VACUUM');
-$dbh->{AutoCommit} = 0;
+$t = qq{$S exclude rules work};
$cp->drop_table_if_exists($testtbl);
$dbh->do(qq{CREATE TABLE $testtbl AS SELECT 123::INTEGER AS a FROM generate_series(1,200000)});
-
-like ($cp->run("-w 0 --exclude=~.* --include=$testtbl"),
+$dbh->commit();
+like ($cp->run("-w 0 --exclude=~.*"),
qr{No matching tables found due to exclusion}, $t);
$t = qq{$S sees a recent VACUUM};
$dbh->do("DELETE FROM $testtbl");
+$dbh->commit();
$dbh->{AutoCommit} = 1;
$dbh->do('VACUUM');
sleep 1;
-
like ($cp->run("-w 0 --exclude=~.* --include=$testtbl"),
qr{^$label OK: DB "$dbname" \(host:$host\).*?\(\d+ second(?:s)?\)}, $t);