Skip Menu |

This queue is for tickets about the Apache-DBI CPAN distribution.

Report information
The Basics
Id: 3333
Status: resolved
Priority: 0/
Queue: Apache-DBI

People
Owner: Nobody in particular
Requestors: jesse [...] bestpractical.com
mrz [...] intelenet.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.92
Fixed in: 0.93



Date: Mon, 25 Aug 2003 23:40:00 -0400
From: Jesse Vincent <jesse [...] bestpractical.com>
To: bug-apache-dbi [...] perl.org
Subject: [fwd] [rt-devel] Apache::DBI 0.92 make test failure - how critical? (from: mrz@intelenet.net)
----- Forwarded message from matthew zeier <mrz@intelenet.net> ----- From: matthew zeier <mrz@intelenet.net> To: rt-devel@lists.fsck.com X-Mailer: Apple Mail (2.552) Subject: [rt-devel] Apache::DBI 0.92 make test failure - how critical? List-Help: <mailto:rt-devel-request@lists.fsck.com?subject=help> List-Post: <mailto:rt-devel@lists.fsck.com> List-Subscribe: <http://lists.fsck.com/mailman/listinfo/rt-devel>, <mailto:rt-devel-request@lists.fsck.com?subject=subscribe> List-Id: RT Development <rt-devel.lists.fsck.com> List-Unsubscribe: <http://lists.fsck.com/mailman/listinfo/rt-devel>, <mailto:rt-devel-request@lists.fsck.com?subject=unsubscribe> List-Archive: <http://lists.fsck.com/pipermail/rt-devel/> X-Spam-Status: No, hits=-3.2 required=7.0 tests=AWL,BAYES_01,KNOWN_MAILING_LIST,PRECEDENCE_BULK, USER_AGENT_APPLEMAIL version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Redhat 8.0, perl 5.8 (vendor supplied). Running 'make test' on Apache::DBI 0.92 gives the following error: t/10mysql....NOK 5# got: '531' # expected: '532' The code is: is($thread_1, $thread_2, "got the same connection both times"); How critical is it that the two threads are the same? I noticed that the current version I have (0.91) has the same error. Is this a mysql issue or an Apache::DBI issue and how will that impact RT? -- matthew zeier - "Nothing in life is to be feared. It is only to be understood." - Marie Curie Show quoted text
_______________________________________________ rt-devel mailing list rt-devel@lists.fsck.com http://lists.fsck.com/mailman/listinfo/rt-devel
----- End forwarded message ----- -- http://www.bestpractical.com/rt -- Trouble Ticketing. Free.
[jesse@bestpractical.com - Mon Aug 25 23:44:10 2003]: Show quoted text
> Redhat 8.0, perl 5.8 (vendor supplied). > > Running 'make test' on Apache::DBI 0.92 gives the following error: > > t/10mysql....NOK 5# got: '531' > # expected: '532'
Which version of DBI.pm do you use? - ask
From: Trevor Schellhorn <trevor.schellhorn-perl [...] marketingtips.com>
[ABH - Tue Aug 26 05:02:14 2003]: Show quoted text
> [jesse@bestpractical.com - Mon Aug 25 23:44:10 2003]:
> > Redhat 8.0, perl 5.8 (vendor supplied). > > > > Running 'make test' on Apache::DBI 0.92 gives the following error: > > > > t/10mysql....NOK 5# got: '531' > > # expected: '532'
> > Which version of DBI.pm do you use? > > > - ask
I had the same problem. The way I got this to work was to fix some of the code in the unit test. I moved the 'use DBI;' below the BEGIN block and I also fixed the BEGIN block so that it did not do the test on the '$DBI::VERSION'. Here is the fixed code for the unit test: <---- code snip ----> use strict; use Test::More tests => 7; BEGIN { # trick DBI.pm into thinking we are running under mod_perl $ENV{MOD_PERL} = 'CGI-Perl'; $ENV{GATEWAY_INTERFACE} = 'CGI-Perl'; use_ok('Apache::DBI', 'load Apache::DBI'); }; use DBI; my $dbd_mysql = eval { require DBD::mysql }; <---- code snip ----> That will allow the test case to pass. The problem is that the order in which the DBI and Apache::DBI modules are loaded. The if/else block required that the DBI module be loaded so that it could check the version of DBI and set the proper environment variable. Since DBI is being loaded before Apache::DBI, it has no way to see that Apache::DBI is loaded. Removing the if/else statements and just setting both environment variables fixes the problem. Also moving the 'use DBI;' statement after the BEGIN block allows the BEGIN block to load Apache::DBI first. When DBI loads, it sets the proper $DBI::connect_via and the test cases work properly. Trevor
--- t/10mysql.t-orig 2003-05-05 08:14:22.000000000 -0700 +++ t/10mysql.t 2003-12-08 14:12:18.000000000 -0800 @@ -1,18 +1,13 @@ use strict; use Test::More tests => 7; -use DBI; BEGIN { # trick DBI.pm into thinking we are running under mod_perl - - if ($DBI::VERSION > 1.33) { - $ENV{MOD_PERL} = 'CGI-Perl'; - } - else { - $ENV{GATEWAY_INTERFACE} = 'CGI-Perl'; - } - use_ok('Apache::DBI', 'load Apache::DBI') + $ENV{MOD_PERL} = 'CGI-Perl'; + $ENV{GATEWAY_INTERFACE} = 'CGI-Perl'; + use_ok('Apache::DBI', 'load Apache::DBI'); }; +use DBI; my $dbd_mysql = eval { require DBD::mysql };
Date: Fri, 9 Jan 2004 18:00:12 -0800 (PST)
From: Ask Bjoern Hansen <ask [...] perl.org>
To: Guest via RT <bug-Apache-DBI [...] rt.cpan.org>
Subject: Re: [cpan #3333] [fwd] [rt-devel] Apache::DBI 0.92 make test failure - how critical? (from: mrz@intelenet.net)
RT-Send-Cc:
On Mon, 8 Dec 2003, Guest via RT wrote: 0.93 should fix this, http://develooper.com/code/Apache::DBI/Apache-DBI-0.93.tar.gz - ask -- http://www.askbjoernhansen.com/ - http://develooper.com/