Author: timbo
Date: Tue Nov 20 06:12:00 2007
New Revision: 10284

Modified:
   dbi/trunk/Changes
   dbi/trunk/t/05thrclone.t
   dbi/trunk/t/85gofer.t

Log:
Improvements to t/80proxy.t test script.
Improvements to t/85gofer.t test script thanks to Stig.


Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes   (original)
+++ dbi/trunk/Changes   Tue Nov 20 06:12:00 2007
@@ -42,6 +42,12 @@
 Call method on transport failure so transport can cleanup/reset if it wants
 Gofer: gearman - need to disable coallesing for non-idempotent requests
 
+=head2 Changes in DBI ...
+
+  Expanded DBI::DBD docs for driver authors thanks to Martin Evans.
+  Improvements to t/80proxy.t test script.
+  Improvements to t/85gofer.t test script thanks to Stig.
+
 =head2 Changes in DBI 1.601 (svn rev 10103),  21st October 2007
 
   Fixed t/05thrclone.t to work with Test::More >= 0.71

Modified: dbi/trunk/t/05thrclone.t
==============================================================================
--- dbi/trunk/t/05thrclone.t    (original)
+++ dbi/trunk/t/05thrclone.t    Tue Nov 20 06:12:00 2007
@@ -11,8 +11,8 @@
 use Test::More;
 
 BEGIN {
-    if (!$Config{useithreads} || $] < 5.008) {
-       plan skip_all => "this $^O perl $] not configured to support iThreads";
+    if (!$Config{useithreads} || $] < 5.008001) {
+       plan skip_all => "this $^O perl $] not supported for DBI iThreads";
     }
     die $use_threads_err if $use_threads_err; # need threads
 }

Modified: dbi/trunk/t/85gofer.t
==============================================================================
--- dbi/trunk/t/85gofer.t       (original)
+++ dbi/trunk/t/85gofer.t       Tue Nov 20 06:12:00 2007
@@ -116,6 +116,8 @@
     my ($transport, $trans_attr, $policy_name) = @_;
 
     my $policy = get_policy($policy_name);
+    my $skip_gofer_checks = ($transport eq 'no');
+
 
     my $test_run_tag = "Testing $transport transport with $policy_name policy";
     print "\n$test_run_tag\n";
@@ -157,7 +159,8 @@
     is_deeply($rowset, [ [ '1', 'oranges' ], [ '2', 'oranges' ] ]);
 
     ok $dbh->do("UPDATE fruit SET dVal='apples' WHERE dVal='oranges'");
-    ok $dbh->{go_response}->executed_flag_set, 'go_response executed flag 
should be true';
+    ok $dbh->{go_response}->executed_flag_set, 'go_response executed flag 
should be true'
+        unless $skip_gofer_checks && pass();
 
     ok $sth = $dbh->prepare("SELECT dKey, dVal FROM fruit");
     ok $sth->execute;
@@ -178,16 +181,14 @@
         $durations{insert}{"$transport+$policy_name"} = dbi_time() - $start;
     }
 
-    my $skip_go_request_count_check = ($transport eq 'no');
-
     print "Testing go_request_count and caching of simple values\n";
     my $go_request_count = $dbh->{go_request_count};
     ok $go_request_count
-        unless $skip_go_request_count_check && pass();
+        unless $skip_gofer_checks && pass();
 
     ok $dbh->do("DROP TABLE fruit");
     is ++$go_request_count, $dbh->{go_request_count}
-        unless $skip_go_request_count_check && pass();
+        unless $skip_gofer_checks && pass();
 
     # tests go_request_count, caching, and skip_default_methods policy
     my $use_remote = ($policy->skip_default_methods) ? 0 : 1;
@@ -196,7 +197,7 @@
 
 SKIP: {
     skip "skip_default_methods checking doesn't work with Gofer over Gofer", 3
-        if $ENV{DBI_AUTOPROXY} or $skip_go_request_count_check;
+        if $ENV{DBI_AUTOPROXY} or $skip_gofer_checks;
     $dbh->data_sources({ foo_bar => $go_request_count });
     is $dbh->{go_request_count}, $go_request_count + 1*$use_remote;
     $dbh->data_sources({ foo_bar => $go_request_count }); # should use cache

Reply via email to