[Bast-commits] r9237 - DBIx-Class/0.08/trunk/t/storage

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Tue Apr 27 16:40:31 GMT 2010


Author: ribasushi
Date: 2010-04-27 17:40:31 +0100 (Tue, 27 Apr 2010)
New Revision: 9237

Added:
   DBIx-Class/0.08/trunk/t/storage/global_destruction.t
Removed:
   DBIx-Class/0.08/trunk/t/storage/factory_fork.t
Log:
Rename test

Deleted: DBIx-Class/0.08/trunk/t/storage/factory_fork.t
===================================================================
--- DBIx-Class/0.08/trunk/t/storage/factory_fork.t	2010-04-27 16:40:10 UTC (rev 9236)
+++ DBIx-Class/0.08/trunk/t/storage/factory_fork.t	2010-04-27 16:40:31 UTC (rev 9237)
@@ -1,57 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More;
-use Test::Exception;
-
-use lib qw(t/lib);
-use DBICTest;
-
-for my $type (qw/PG MYSQL/) {
-
-  SKIP: {
-    skip "Skipping $type tests without DBICTEST_${type}_DSN", 1
-      unless $ENV{"DBICTEST_${type}_DSN"};
-
-    my $schema = DBICTest::Schema->connect (@ENV{map { "DBICTEST_${type}_${_}" } qw/DSN USER PASS/});
-
-    # emulate a singleton-factory, just cache the object *somewhere in a different package*
-    # to induce out-of-order destruction
-    $DBICTest::FakeSchemaFactory::schema = $schema;
-
-    # so we can see the retry exceptions (if any)
-    $ENV{DBIC_DBIRETRY_DEBUG} = 1;
-
-    ok (!$schema->storage->connected, "$type: start disconnected");
-
-    lives_ok (sub {
-      $schema->txn_do (sub {
-
-        ok ($schema->storage->connected, "$type: transaction starts connected");
-
-        my $pid = fork();
-        SKIP: {
-          skip "Fork failed: $!", 1 if (! defined $pid);
-
-          if ($pid) {
-            note "Parent $$ sleeping...";
-            wait();
-            note "Parent $$ woken up after child $pid exit";
-          }
-          else {
-            note "Child $$ terminating";
-            exit 0;
-          }
-
-          ok ($schema->storage->connected, "$type: parent still connected (in txn_do)");
-        }
-      });
-    });
-
-    ok ($schema->storage->connected, "$type: parent still connected (outside of txn_do)");
-
-    undef $DBICTest::FakeSchemaFactory::schema;
-  }
-}
-
-done_testing;

Copied: DBIx-Class/0.08/trunk/t/storage/global_destruction.t (from rev 9236, DBIx-Class/0.08/trunk/t/storage/factory_fork.t)
===================================================================
--- DBIx-Class/0.08/trunk/t/storage/global_destruction.t	                        (rev 0)
+++ DBIx-Class/0.08/trunk/t/storage/global_destruction.t	2010-04-27 16:40:31 UTC (rev 9237)
@@ -0,0 +1,57 @@
+use strict;
+use warnings;
+
+use Test::More;
+use Test::Exception;
+
+use lib qw(t/lib);
+use DBICTest;
+
+for my $type (qw/PG MYSQL/) {
+
+  SKIP: {
+    skip "Skipping $type tests without DBICTEST_${type}_DSN", 1
+      unless $ENV{"DBICTEST_${type}_DSN"};
+
+    my $schema = DBICTest::Schema->connect (@ENV{map { "DBICTEST_${type}_${_}" } qw/DSN USER PASS/});
+
+    # emulate a singleton-factory, just cache the object *somewhere in a different package*
+    # to induce out-of-order destruction
+    $DBICTest::FakeSchemaFactory::schema = $schema;
+
+    # so we can see the retry exceptions (if any)
+    $ENV{DBIC_DBIRETRY_DEBUG} = 1;
+
+    ok (!$schema->storage->connected, "$type: start disconnected");
+
+    lives_ok (sub {
+      $schema->txn_do (sub {
+
+        ok ($schema->storage->connected, "$type: transaction starts connected");
+
+        my $pid = fork();
+        SKIP: {
+          skip "Fork failed: $!", 1 if (! defined $pid);
+
+          if ($pid) {
+            note "Parent $$ sleeping...";
+            wait();
+            note "Parent $$ woken up after child $pid exit";
+          }
+          else {
+            note "Child $$ terminating";
+            exit 0;
+          }
+
+          ok ($schema->storage->connected, "$type: parent still connected (in txn_do)");
+        }
+      });
+    });
+
+    ok ($schema->storage->connected, "$type: parent still connected (outside of txn_do)");
+
+    undef $DBICTest::FakeSchemaFactory::schema;
+  }
+}
+
+done_testing;




More information about the Bast-commits mailing list