[Jifty-commit] r2148 - in Jifty-DBI/trunk: t

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Mon Nov 13 10:56:44 EST 2006


Author: jesse
Date: Mon Nov 13 10:56:43 2006
New Revision: 2148

Modified:
   Jifty-DBI/trunk/   (props changed)
   Jifty-DBI/trunk/Changes
   Jifty-DBI/trunk/t/01records.t
   Jifty-DBI/trunk/t/01searches.t
   Jifty-DBI/trunk/t/02-column_constraints.t
   Jifty-DBI/trunk/t/02records_cachable.t
   Jifty-DBI/trunk/t/02records_object.t
   Jifty-DBI/trunk/t/04memcached.t
   Jifty-DBI/trunk/t/06filter_datetime.t
   Jifty-DBI/trunk/t/06filter_truncate.t
   Jifty-DBI/trunk/t/06filter_utf8.t
   Jifty-DBI/trunk/t/11schema_records.t

Log:
 r44776 at pinglin:  jesse | 2006-11-13 10:56:24 -0500
 * Tests updated to not have $sth in scope when we $dbh->disconnect


Modified: Jifty-DBI/trunk/Changes
==============================================================================
--- Jifty-DBI/trunk/Changes	(original)
+++ Jifty-DBI/trunk/Changes	Mon Nov 13 10:56:43 2006
@@ -1,4 +1,5 @@
- * avoid a warning in Jifty::DBI::Schema when our user is executing a
+* Tests updated to make sure we don't have statement handles in scope when we close the database handle.
+* avoid a warning in Jifty::DBI::Schema when our user is executing a
    .pm file
  
 Revision history for Perl extension Jifty::DBI.

Modified: Jifty-DBI/trunk/t/01records.t
==============================================================================
--- Jifty-DBI/trunk/t/01records.t	(original)
+++ Jifty-DBI/trunk/t/01records.t	Mon Nov 13 10:56:43 2006
@@ -26,8 +26,8 @@
         connect_handle( $handle );
         isa_ok($handle->dbh, 'DBI::db');
 
-        my $ret = init_schema( 'TestApp::Address', $handle );
-        isa_ok($ret,'DBI::st', "Inserted the schema. got a statement handle back");
+        {my $ret = init_schema( 'TestApp::Address', $handle );
+        isa_ok($ret,'DBI::st', "Inserted the schema. got a statement handle back" );}
 
         my $rec = TestApp::Address->new( handle => $handle );
         isa_ok($rec, 'Jifty::DBI::Record');

Modified: Jifty-DBI/trunk/t/01searches.t
==============================================================================
--- Jifty-DBI/trunk/t/01searches.t	(original)
+++ Jifty-DBI/trunk/t/01searches.t	Mon Nov 13 10:56:43 2006
@@ -26,8 +26,8 @@
         connect_handle( $handle );
         isa_ok($handle->dbh, 'DBI::db');
 
-        my $ret = init_schema( 'TestApp', $handle );
-        isa_ok($ret,'DBI::st', "Inserted the schema. got a statement handle back");
+        {my $ret = init_schema( 'TestApp', $handle );
+        isa_ok($ret,'DBI::st', "Inserted the schema. got a statement handle back" );}
 
         my $count_all = init_data( 'TestApp::User', $handle );
         ok( $count_all,  "init users data" );

Modified: Jifty-DBI/trunk/t/02-column_constraints.t
==============================================================================
--- Jifty-DBI/trunk/t/02-column_constraints.t	(original)
+++ Jifty-DBI/trunk/t/02-column_constraints.t	Mon Nov 13 10:56:43 2006
@@ -27,8 +27,10 @@
         connect_handle( $handle );
         isa_ok($handle->dbh, 'DBI::db');
 
-        my $ret = init_schema( 'TestApp', $handle );
-        isa_ok($ret,'DBI::st', "Inserted the schema. got a statement handle back");
+        {{my $ret = init_schema( 'TestApp', $handle );
+        isa_ok($ret,'DBI::st', "Inserted the schema. got a statement handle back" );}
+        }
+
 
         my $emp = TestApp::Employee->new( handle => $handle );
         my $e_id = $emp->create( name => 'RUZ', employee_num => '123' );

Modified: Jifty-DBI/trunk/t/02records_cachable.t
==============================================================================
--- Jifty-DBI/trunk/t/02records_cachable.t	(original)
+++ Jifty-DBI/trunk/t/02records_cachable.t	Mon Nov 13 10:56:43 2006
@@ -25,9 +25,9 @@
         connect_handle($handle);
         isa_ok( $handle->dbh, 'DBI::db' );
 
-        my $ret = init_schema( 'TestApp::Address', $handle );
+        {my $ret = init_schema( 'TestApp::Address', $handle );
         isa_ok( $ret, 'DBI::st',
-            "Inserted the schema. got a statement handle back" );
+            "Inserted the schema. got a statement handle back" );}
 
         {    # simple, load the same thing from cache
             my $rec = TestApp::Address->new( handle => $handle );

Modified: Jifty-DBI/trunk/t/02records_object.t
==============================================================================
--- Jifty-DBI/trunk/t/02records_object.t	(original)
+++ Jifty-DBI/trunk/t/02records_object.t	Mon Nov 13 10:56:43 2006
@@ -27,8 +27,8 @@
         connect_handle( $handle );
         isa_ok($handle->dbh, 'DBI::db');
 
-        my $ret = init_schema( 'TestApp', $handle );
-        isa_ok($ret,'DBI::st', "Inserted the schema. got a statement handle back");
+        {my $ret = init_schema( 'TestApp', $handle );
+        isa_ok($ret,'DBI::st', "Inserted the schema. got a statement handle back" );}
 
         my $emp = TestApp::Employee->new( handle => $handle );
         my $e_id = $emp->create( Name => 'RUZ' );

Modified: Jifty-DBI/trunk/t/04memcached.t
==============================================================================
--- Jifty-DBI/trunk/t/04memcached.t	(original)
+++ Jifty-DBI/trunk/t/04memcached.t	Mon Nov 13 10:56:43 2006
@@ -36,9 +36,9 @@
         connect_handle($handle);
         isa_ok($handle->dbh, 'DBI::db');
 
-        my $ret = init_schema( 'TestApp::Address', $handle );
+        {my $ret = init_schema( 'TestApp::Address', $handle );
         isa_ok( $ret, 'DBI::st',
-                "Inserted the schema. got a statement handle back" );
+                "Inserted the schema. got a statement handle back" );}
 
 
         # Create a record, load from cache

Modified: Jifty-DBI/trunk/t/06filter_datetime.t
==============================================================================
--- Jifty-DBI/trunk/t/06filter_datetime.t	(original)
+++ Jifty-DBI/trunk/t/06filter_datetime.t	Mon Nov 13 10:56:43 2006
@@ -27,8 +27,8 @@
         connect_handle( $handle );
         isa_ok($handle->dbh, 'DBI::db');
 
-        my $ret = init_schema( 'TestApp::User', $handle );
-        isa_ok($ret,'DBI::st', "Inserted the schema. got a statement handle back");
+        {my $ret = init_schema( 'TestApp::User', $handle );
+        isa_ok($ret,'DBI::st', "Inserted the schema. got a statement handle back" );}
 
         my $rec = TestApp::User->new( handle => $handle );
         isa_ok($rec, 'Jifty::DBI::Record');

Modified: Jifty-DBI/trunk/t/06filter_truncate.t
==============================================================================
--- Jifty-DBI/trunk/t/06filter_truncate.t	(original)
+++ Jifty-DBI/trunk/t/06filter_truncate.t	Mon Nov 13 10:56:43 2006
@@ -25,8 +25,8 @@
                 skip "No schema for '$d' driver", TESTS_PER_DRIVER - 1;
         }
 
-        my $ret = init_schema( 'TestApp::User', $handle );
-        isa_ok($ret,'DBI::st', "Inserted the schema. got a statement handle back");
+        {my $ret = init_schema( 'TestApp::User', $handle );
+        isa_ok($ret,'DBI::st', "Inserted the schema. got a statement handle back" );}
 
         my $rec = TestApp::User->new( handle => $handle );
         isa_ok($rec, 'Jifty::DBI::Record');

Modified: Jifty-DBI/trunk/t/06filter_utf8.t
==============================================================================
--- Jifty-DBI/trunk/t/06filter_utf8.t	(original)
+++ Jifty-DBI/trunk/t/06filter_utf8.t	Mon Nov 13 10:56:43 2006
@@ -27,8 +27,8 @@
         connect_handle( $handle );
         isa_ok($handle->dbh, 'DBI::db');
 
-        my $ret = init_schema( 'TestApp::User', $handle );
-        isa_ok($ret,'DBI::st', "Inserted the schema. got a statement handle back");
+        {my $ret = init_schema( 'TestApp::User', $handle );
+        isa_ok($ret,'DBI::st', "Inserted the schema. got a statement handle back" );}
 
         $handle->input_filters( 'Jifty::DBI::Filter::utf8' );
         is( ($handle->input_filters)[0], 'Jifty::DBI::Filter::utf8', 'Filter was added' );

Modified: Jifty-DBI/trunk/t/11schema_records.t
==============================================================================
--- Jifty-DBI/trunk/t/11schema_records.t	(original)
+++ Jifty-DBI/trunk/t/11schema_records.t	Mon Nov 13 10:56:43 2006
@@ -27,8 +27,8 @@
         connect_handle( $handle );
         isa_ok($handle->dbh, 'DBI::db', "Got handle for $d");
 
-        my $ret = init_schema( 'TestApp', $handle );
-        isa_ok($ret,'DBI::st', "Inserted the schema. got a statement handle back");
+        {my $ret = init_schema( 'TestApp', $handle );
+        isa_ok($ret,'DBI::st', "Inserted the schema. got a statement handle back" );}
 
         my $emp = TestApp::Employee->new( handle => $handle );
         my $e_id = $emp->create( Name => 'RUZ' );


More information about the Jifty-commit mailing list