summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Sabino Mullane2013-03-13 18:37:56 +0000
committerGreg Sabino Mullane2013-03-13 18:37:56 +0000
commite372ef068b1aadaacbc1307865c92bf51be8ff13 (patch)
treea8794a41dfadb23d6274c04a3a2fe3edea1c138a
parentf3ad31299c3f987e931af553b9bee92ffc76c5b4 (diff)
Don't barf when schema does not exist.
-rw-r--r--t/02_pgagent_jobs.t8
1 files changed, 2 insertions, 6 deletions
diff --git a/t/02_pgagent_jobs.t b/t/02_pgagent_jobs.t
index 003bbff20..74f768a8c 100644
--- a/t/02_pgagent_jobs.t
+++ b/t/02_pgagent_jobs.t
@@ -24,7 +24,7 @@ like $cp->run('-c=abc'), qr{must be a valid time}, "$S fails with invalid -c";
# Set up a dummy pgagent schema.
$dbh->{AutoCommit} = 1;
-$dbh->do('DROP SCHEMA pgagent CASCADE');
+$dbh->do('DROP SCHEMA IF EXISTS pgagent CASCADE');
$dbh->do(q{
SET client_min_messages TO warning;
@@ -57,11 +57,7 @@ $dbh->do(q{
);
RESET client_min_messages;
});
-END { $dbh->do(q{
- SET client_min_messages TO warning;
- DROP SCHEMA pgagent CASCADE;
- RESET client_min_messages;
-}) if $dbh; }
+END { $dbh->do('DROP SCHEMA IF EXISTS pgagent CASCADE'); }
like $cp->run('-c=1d'), qr{^$label OK: DB "postgres"}, "$S returns ok for no jobs";