[Bast-commits] r8261 - in
DBIx-Class/0.08/branches/connected_schema_leak/t: . lib
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Sat Jan 9 00:35:34 GMT 2010
Author: ribasushi
Date: 2010-01-09 00:35:34 +0000 (Sat, 09 Jan 2010)
New Revision: 8261
Modified:
DBIx-Class/0.08/branches/connected_schema_leak/t/99dbic_sqlt_parser.t
DBIx-Class/0.08/branches/connected_schema_leak/t/lib/DBICTest.pm
Log:
Test for the real leak reason
Modified: DBIx-Class/0.08/branches/connected_schema_leak/t/99dbic_sqlt_parser.t
===================================================================
--- DBIx-Class/0.08/branches/connected_schema_leak/t/99dbic_sqlt_parser.t 2010-01-09 00:24:56 UTC (rev 8260)
+++ DBIx-Class/0.08/branches/connected_schema_leak/t/99dbic_sqlt_parser.t 2010-01-09 00:35:34 UTC (rev 8261)
@@ -5,6 +5,8 @@
use Test::Exception;
use lib qw(t/lib);
use DBICTest;
+use DBICTest::Schema;
+use Scalar::Util ();
BEGIN {
require DBIx::Class::Storage::DBI;
@@ -13,6 +15,16 @@
if not DBIx::Class::Storage::DBI->_sqlt_version_ok;
}
+# Test for SQLT-related leaks
+{
+ my $s = DBICTest::Schema->clone;
+ my $sqlt_s = create_schema ({ schema => $s });
+ Scalar::Util::weaken ($s);
+
+ ok (!$s, 'Schema not leaked');
+}
+
+
my $schema = DBICTest->init_schema();
# Dummy was yanked out by the sqlt hook test
# CustomSql tests the horrific/deprecated ->name(\$sql) hack
Modified: DBIx-Class/0.08/branches/connected_schema_leak/t/lib/DBICTest.pm
===================================================================
--- DBIx-Class/0.08/branches/connected_schema_leak/t/lib/DBICTest.pm 2010-01-09 00:24:56 UTC (rev 8260)
+++ DBIx-Class/0.08/branches/connected_schema_leak/t/lib/DBICTest.pm 2010-01-09 00:35:34 UTC (rev 8261)
@@ -127,7 +127,7 @@
my $args = shift || {};
if ($ENV{"DBICTEST_SQLT_DEPLOY"}) {
- $schema->deploy($args);
+ $schema->deploy($args);
} else {
open IN, "t/lib/sqlite.sql";
my $sql;
More information about the Bast-commits
mailing list