From 2726603903fcde5a7f07f6a4604a26732e0a1e66 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Thu, 23 Apr 2009 13:52:37 -0400 Subject: [PATCH] Remove all tables, so other test tables don't interfere. --- t/02_relation_size.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/t/02_relation_size.t b/t/02_relation_size.t index f1e28ce80..acc3c101e 100644 --- a/t/02_relation_size.t +++ b/t/02_relation_size.t @@ -52,9 +52,14 @@ like ($cp->run(q{-w 1 --perflimit 2}), $t = qq{$S detects no matching tables due to unknown user}; like ($cp->run(q{-w 1 --includeuser foo}), qr{$label OK:.*No matching entries found due to user exclusion/inclusion options}, $t); +## We need to remove all tables to make this work correctly local $dbh->{Warn} = 0; -$dbh->do("DROP TABLE IF EXISTS $testtbl"); +my @info = $dbh->tables('','public','','TABLE'); +for my $tab (@info) { + $dbh->do("DROP TABLE $tab CASCADE"); +} $dbh->do(qq{CREATE TABLE $testtbl (a integer)}); + $dbh->commit; $t = qq{$S detects matching tables using 'testuser'}; -- 2.39.5