Author: turnstep
Date: Tue Jan 15 14:05:20 2008
New Revision: 10558
Modified:
DBD-Pg/trunk/t/08async.t
Log:
Rearrange skip logic.
Modified: DBD-Pg/trunk/t/08async.t
==============================================================================
--- DBD-Pg/trunk/t/08async.t (original)
+++ DBD-Pg/trunk/t/08async.t Tue Jan 15 14:05:20 2008
@@ -11,18 +11,20 @@
require 'dbdpg_test_setup.pl';
select(($|=1,select(STDERR),$|=1)[1]);
+if (!defined $ENV{DBI_DSN}) {
+ plan skip_all => 'Cannot run test unless DBI_DSN is defined. See the
README file';
+}
+
my $dbh = connect_database();
my $pglibversion = $dbh->{pg_lib_version};
if ($pglibversion < 80000) {
+ cleanup_database($dbh,'test');
+ $dbh->disconnect;
plan skip_all => 'Cannot run asynchronous queries with pre-8.0
libraries.';
}
-elsif (defined $ENV{DBI_DSN}) {
- plan tests => 66;
-}
-else {
- plan skip_all => 'Cannot run test unless DBI_DSN is defined. See the
README file';
-}
+
+plan tests => 66;
ok( defined $dbh, 'Connect to database for async testing');