Skip Menu |

This queue is for tickets about the Net-Amazon CPAN distribution.

Report information
The Basics
Id: 30468
Status: resolved
Priority: 0/
Queue: Net-Amazon

People
Owner: Nobody in particular
Requestors: gregor+debian [...] comodo.priv.at
Cc:
AdminCc:

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



Subject: Problem with tests and canned responses
Date: Sun, 4 Nov 2007 18:03:24 +0100
To: bug-Net-Amazon [...] rt.cpan.org
From: gregor herrmann <gregor+debian [...] comodo.priv.at>
When I built Net::Amazon in a chroot I noticed a problem when running 'make test', e.g. in t/007Manufacturer.t: First the canned responses are used but when the request method gets to $res->is_page_available it tries to fetch page 2 over the net instead of using the canned responses. The following patch seems to fix this: #v+ --- lib/Net/Amazon.pm (revision 8833) +++ lib/Net/Amazon.pm (working copy) @@ -482,7 +482,8 @@ ################################################## my($self, $ref, $new_items, $page) = @_; if(exists $ref->{Items}->{TotalPages} and - $ref->{Items}->{TotalPages} > $page) { + $ref->{Items}->{TotalPages} > $page and + $IS_CANNED ne 1) { DEBUG("Page $page of $ref->{Items}->{TotalPages} fetched - continuing"); return 1; } #v- Cheers, gregor (Debian Perl Group) -- .''`. http://info.comodo.priv.at/ | gpg key ID: 0x00F3CFE4 : :' : debian: the universal operating system - http://www.debian.org/ `. `' member of https://www.vibe.at/ | how to reply: http://got.to/quote/ `- NP: JBO: Frauen
Download signature.asc
application/pgp-signature 189b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #30468] Problem with tests and canned responses
Date: Sun, 4 Nov 2007 12:44:27 -0500
To: bug-Net-Amazon [...] rt.cpan.org
From: "Christopher Boumenot" <boumenot [...] gmail.com>
Good find! Thanks for the patch. I'll apply it, and release a new version. Regards, Christopher On Nov 4, 2007 12:04 PM, gregor+debian@comodo.priv.at via RT <bug-Net-Amazon@rt.cpan.org> wrote: Show quoted text
> > Sun Nov 04 12:04:10 2007: Request 30468 was acted upon. > Transaction: Ticket created by gregor+debian@comodo.priv.at > Queue: Net-Amazon > Subject: Problem with tests and canned responses > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: gregor+debian@comodo.priv.at > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=30468 > > > > When I built Net::Amazon in a chroot I noticed a problem when running > 'make test', e.g. in t/007Manufacturer.t: > First the canned responses are used but when the request method gets > to $res->is_page_available it tries to fetch page 2 over the net > instead of using the canned responses. > > The following patch seems to fix this: > > #v+ > > --- lib/Net/Amazon.pm (revision 8833) > +++ lib/Net/Amazon.pm (working copy) > @@ -482,7 +482,8 @@ > ################################################## > my($self, $ref, $new_items, $page) = @_; > if(exists $ref->{Items}->{TotalPages} and > - $ref->{Items}->{TotalPages} > $page) { > + $ref->{Items}->{TotalPages} > $page and > + $IS_CANNED ne 1) { > DEBUG("Page $page of $ref->{Items}->{TotalPages} fetched - continuing"); > return 1; > } > > #v- > > Cheers, > gregor (Debian Perl Group) > -- > .''`. http://info.comodo.priv.at/ | gpg key ID: 0x00F3CFE4 > : :' : debian: the universal operating system - http://www.debian.org/ > `. `' member of https://www.vibe.at/ | how to reply: http://got.to/quote/ > `- NP: JBO: Frauen > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > > iD8DBQFHLftcOzKYnQDzz+QRAvgLAKC3Ud0YPetUK01PBn4D1Je6D4RQJACgnZhJ > 5nW9ZUnGtXQdvin6hDCrrMg= > =5bxb > -----END PGP SIGNATURE----- > >
Subject: Re: [rt.cpan.org #30468] Problem with tests and canned responses
Date: Sun, 4 Nov 2007 21:33:07 +0100
To: Christopher Boumenot via RT <bug-Net-Amazon [...] rt.cpan.org>
From: gregor herrmann <gregor+debian [...] comodo.priv.at>
On Sun, 04 Nov 2007 12:45:01 -0500, Christopher Boumenot via RT wrote: Show quoted text
> Good find! Thanks for the patch. I'll apply it, and release a new version.
Cool, thanks! Cheers, gregor -- .''`. http://info.comodo.priv.at/ | gpg key ID: 0x00F3CFE4 : :' : debian: the universal operating system - http://www.debian.org/ `. `' member of https://www.vibe.at/ | how to reply: http://got.to/quote/ `-
Download signature.asc
application/pgp-signature 189b

Message body not shown because it is not plain text.

Fixed in 0.45.