From b06ab3c502c26a0135ac30e01a45616060cbc2af Mon Sep 17 00:00:00 2001 From: Graham McVicker <mcvicker@sanger.ac.uk> Date: Fri, 6 Aug 2004 11:56:47 +0000 Subject: [PATCH] updated test for modified DBConnection behaviour --- modules/t/dbConnection.t | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/t/dbConnection.t b/modules/t/dbConnection.t index a202caa466..b5cf8c9126 100644 --- a/modules/t/dbConnection.t +++ b/modules/t/dbConnection.t @@ -124,9 +124,11 @@ ok(test_getter_setter($dbc, 'db_handle', $dbc->db_handle)); # try the database with the disconnect_when_inactive flag set. # this should automatically disconnect from the db # +my $dbh = $dbc->db_handle(); + $dbc->disconnect_when_inactive(1); -ok(!$dbc->db_handle->ping()); +ok(!$dbh->ping()); { # reconnect should happen now @@ -138,7 +140,9 @@ ok(!$dbc->db_handle->ping()); # disconnect should occur now } -ok(!$dbc->db_handle->ping()); +ok(!$dbh->ping()); + +$dbh = $dbc->db_handle(); # # try the same thing but with 2 connections at a time @@ -162,7 +166,7 @@ ok(!$dbc->db_handle->ping()); } -ok(!$dbc->db_handle->ping()); +ok(!$dbh->ping()); $dbc->disconnect_when_inactive(0); -- GitLab