diff options
author | Christoph Berg | 2016-06-06 17:03:36 +0000 |
---|---|---|
committer | Christoph Berg | 2016-06-06 20:57:14 +0000 |
commit | 1a25cff190c0ec0628a25bca42b6a18e71051c0d (patch) | |
tree | e5f0e3eaf0642316b0fb7efdf9f5bfe97f9c8a31 | |
parent | 33b180d516172087a6caf2a654cafcda1220a4ad (diff) |
Replace $dbh->tables() with selectall_arrayref()
$dbh->tables() seems to be throwing errors in travis. Replace by
a standard catalog query.
t/02_commitratio.t ......... DBD::Pg::db tables failed: no statement executing at t/CP_Testing.pm line 825.
Looks like your test exited with 255 before it could output anything.
-rw-r--r-- | t/CP_Testing.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/CP_Testing.pm b/t/CP_Testing.pm index d9de296f8..0ed72874c 100644 --- a/t/CP_Testing.pm +++ b/t/CP_Testing.pm @@ -821,9 +821,9 @@ sub drop_all_tables { my $self = shift; my $dbh = $self->{dbh} || die; $dbh->{Warn} = 0; - my @info = $dbh->tables('','public','','TABLE'); - for my $tab (@info) { - $dbh->do("DROP TABLE $tab CASCADE"); + my $tables = $dbh->selectall_arrayref("SELECT tablename FROM pg_tables WHERE schemaname = 'public'"); + for my $tab (@$tables) { + $dbh->do("DROP TABLE $tab->[0] CASCADE"); } $dbh->{Warn} = 1; $dbh->commit(); |