[Bast-commits] r7480 - DBIx-Class/0.08/trunk/t

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Wed Sep 2 09:07:05 GMT 2009


Author: ribasushi
Date: 2009-09-02 09:07:04 +0000 (Wed, 02 Sep 2009)
New Revision: 7480

Modified:
   DBIx-Class/0.08/trunk/t/72pg.t
Log:
Streamline pg test-schemas cleanup

Modified: DBIx-Class/0.08/trunk/t/72pg.t
===================================================================
--- DBIx-Class/0.08/trunk/t/72pg.t	2009-09-01 20:52:21 UTC (rev 7479)
+++ DBIx-Class/0.08/trunk/t/72pg.t	2009-09-02 09:07:04 UTC (rev 7480)
@@ -77,7 +77,7 @@
 $schema->source("SequenceTest")->name("testschema.sequence_test");
 {
     local $SIG{__WARN__} = sub {};
-    _cleanup ($dbh);
+    _cleanup ($schema);
 
     my $artist_table_def = <<EOS;
 (
@@ -317,26 +317,21 @@
 is($st->pkid1, 55, "Oracle Auto-PK without trigger: First primary key set manually");
 
 sub _cleanup {
-  my $dbh = shift or return;
+  my $schema = shift or return;
+  local $SIG{__WARN__} = sub {};
 
   for my $stat (
-    'DROP TABLE testschema.artist',
-    'DROP TABLE testschema.casecheck',
-    'DROP TABLE testschema.sequence_test',
-    'DROP TABLE testschema.array_test',
+    'DROP SCHEMA testschema CASCADE',
+    'DROP SCHEMA anothertestschema CASCADE',
+    'DROP SCHEMA yetanothertestschema CASCADE',
     'DROP SEQUENCE pkid1_seq',
     'DROP SEQUENCE pkid2_seq',
     'DROP SEQUENCE nonpkid_seq',
-    'DROP SCHEMA testschema',
-    'DROP TABLE anothertestschema.artist',
-    'DROP SCHEMA anothertestschema',
-    'DROP TABLE yetanothertestschema.artist',
-    'DROP SCHEMA yetanothertestschema',
   ) {
-    eval { $dbh->do ($stat) };
+    eval { $schema->storage->_do_query ($stat) };
   }
 }
 
 done_testing;
 
-END { _cleanup($dbh) }
+END { _cleanup($schema) }




More information about the Bast-commits mailing list