Skip Menu |

This queue is for tickets about the Test-postgresql CPAN distribution.

Report information
The Basics
Id: 108460
Status: resolved
Priority: 0/
Queue: Test-postgresql

People
Owner: TJC [...] cpan.org
Requestors: ribasushi [...] leporine.io
Cc: ilmari [...] ilmari.org
peter [...] sysnix.com
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in:
  • 1.10
  • 1.20_05



CC: ilmari [...] ilmari.org, peter [...] sysnix.com
Subject: Reproducible (albeit intermittent, roughly 7/10) failure on cleanup
Attached is the smallest reproducible script I could put together. There are two failures in one here: - If the last END line is commented out - the teardown takes considerably longer, with an error message (likely due to the peculiarity that the last statement perl sees is executed in ${^GLOBAL_PHASE} eq 'DESTRUCT') - If however the last END line is uncommented, the teardown is speedy, but the exit status ($?) often ends up being 6, causing test harnesses to interpret successfu tests as failure. This reliably fails on various perl/DBD versions. My test RBMS is ii postgresql-9.1 9.1.18-0+deb7u1 amd64 Cheers!
Subject: test_pgsql_cleanup_failure.t
use strict; use warnings; use Test::PostgreSQL; my $t_pg = Test::PostgreSQL->new; my $dbh = DBI->connect( $t_pg->dsn, undef, undef, { RaiseError => 1, AutoCommit => 1 } ); $dbh->do('SET client_min_messages=warning'); $dbh->do('CREATE TABLE _test_foo ( pk SERIAL PRIMARY KEY, bar VARCHAR(10) )'); $dbh->do( 'ALTER TABLE _test_foo RENAME TO _test_fluff' ); # If this is the last statement in the file - things hang for a bit and # then `Pg refused to die gracefully; killing it violently.` happens $dbh->selectall_arrayref( 'SELECT * FROM _test_fluff' ); # If however this line is uncommented, by essentially delayin the $t_pg # destruction - we get a 7-out-of-10 non-0 exit :/ END { my $dummy = $t_pg }
CC: ilmari [...] ilmari.org
Subject: Re: [rt.cpan.org #108460] Reproducible (albeit intermittent, roughly 7/10) failure on cleanup
Date: Wed, 04 Nov 2015 19:29:56 +0100
To: bug-Test-postgresql [...] rt.cpan.org
From: Peter Mottram <peter [...] sysnix.com>
On 04/11/15 17:19, Peter Rabbitson via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=108460 > > > Attached is the smallest reproducible script I could put together. There are two failures in one here: > > - If the last END line is commented out - the teardown takes considerably longer, with an error message (likely due to the peculiarity that the last statement perl sees is executed in ${^GLOBAL_PHASE} eq 'DESTRUCT')
For Pg>=9 github master branch fixes this by using pg_ctl rather than bashing the Pg process with a big stick. Show quoted text
> - If however the last END line is uncommented, the teardown is speedy, but the exit status ($?) often ends up being 6, causing test harnesses to interpret successfu tests as failure.
As per https://rt.cpan.org/Public/Bug/Display.html?id=107957 this is probably fixed by localising $? in DESTROY though my reading on the subject is minimal so I bow to osfameron's knowledge here. I also haven't been able to reproduce this locally with either release 1.06 or guthub master branch so I cannot test reliably. Show quoted text
> This reliably fails on various perl/DBD versions. My test RBMS is > ii postgresql-9.1 9.1.18-0+deb7u1 amd64 > > Cheers! >
Is it possible to get the branch on CPAN as a dev release? It's much easier compared to testing stuff off github.
On Wed Nov 04 15:53:27 2015, RIBASUSHI wrote: Show quoted text
> Is it possible to get the branch on CPAN as a dev release? It's much > easier compared to testing stuff off github.
I have uploaded a developer release, 1.10_01 -- can you test this out please? If it's all good, I'll make it a proper release. Sorry it's taken so long between releases lately.. Too many other things on my plate to finish the refactoring I started.
RT-Send-CC: peter [...] sysnix.com, ilmari [...] ilmari.org
Hi guys, I wondered if you'd had a chance to test the developer release? I'd like to push that out as a final version before I forget about it for even longer. I've mostly moved away from CPAN development so I'd love if it either of you wanted to become maintainer. Toby On Thu Nov 05 21:44:29 2015, TJC wrote: Show quoted text
> On Wed Nov 04 15:53:27 2015, RIBASUSHI wrote:
> > Is it possible to get the branch on CPAN as a dev release? It's much > > easier compared to testing stuff off github.
> > > I have uploaded a developer release, 1.10_01 -- can you test this out > please? > If it's all good, I'll make it a proper release. > > Sorry it's taken so long between releases lately.. Too many other > things on my plate to finish the refactoring I started.
Subject: Re: [rt.cpan.org #108460] Reproducible (albeit intermittent, roughly 7/10) failure on cleanup
Date: Wed, 06 Jan 2016 11:43:59 +0100
To: bug-Test-postgresql [...] rt.cpan.org
From: Peter Mottram <peter [...] sysnix.com>
On 06/01/16 04:22, Toby C via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=108460 > > > Hi guys, > I wondered if you'd had a chance to test the developer release? > I'd like to push that out as a final version before I forget about it for even longer. > > I've mostly moved away from CPAN development so I'd love if it either of you wanted to become maintainer. > > Toby > >
Hi Toby I've been using the dev release without any issues on Linux and Windows so for me it is good. Would like to have +1 from ribasushi / ilmari if possible. I'd be happy to take over maint since I can't work without this module and there are still a few small things I'd like to look at. R. PeteM
RT-Send-CC: peter [...] sysnix.com, ilmari [...] ilmari.org, ribasushi [...] cpan.org
On Wed Jan 06 05:44:12 2016, peter@sysnix.com wrote: Show quoted text
> Hi Toby > > I've been using the dev release without any issues on Linux and > Windows > so for me it is good. Would like to have +1 from ribasushi / ilmari if > possible.
Cool. Will give them a few days. I also have a significantly refactored codebase that I've just pushed to Github. I'm nervous because I never had the time to test it out on much except our local infrastructure, which is fairly homogenous. (Debian, Ubuntu, Postgres 9.3 to 9.4) I've released that as another dev version now - 1.20_01 - but I'm thinking we should release 1.10 final first. Show quoted text
> I'd be happy to take over maint since I can't work without this module > and there are still a few small things I'd like to look at.
Cheers, let me know your PAUSE ID? Toby
Subject: Re: [rt.cpan.org #108460] Reproducible (albeit intermittent, roughly 7/10) failure on cleanup
Date: Thu, 07 Jan 2016 12:26:09 +0100
To: bug-Test-postgresql [...] rt.cpan.org
From: Peter Mottram <peter [...] sysnix.com>
On 07/01/16 03:18, Toby C via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=108460 > > > On Wed Jan 06 05:44:12 2016, peter@sysnix.com wrote:
>> Hi Toby >> >> I've been using the dev release without any issues on Linux and >> Windows >> so for me it is good. Would like to have +1 from ribasushi / ilmari if >> possible.
> Cool. Will give them a few days. > > I also have a significantly refactored codebase that I've just pushed to Github. I'm nervous because I never had the time to test it out on much except our local infrastructure, which is fairly homogenous. (Debian, Ubuntu, Postgres 9.3 to 9.4) > > I've released that as another dev version now - 1.20_01 - but I'm thinking we should release 1.10 final first.
Agree - get 1.10 released first. I'll have a play with 1.20 dev asap though testing on Windows might take a week or so as I'm short of resources atm. Show quoted text
>
>> I'd be happy to take over maint since I can't work without this module >> and there are still a few small things I'd like to look at.
> Cheers, let me know your PAUSE ID? >
pause id: SYSPETE R. PeteM
RT-Send-CC: ilmari [...] ilmari.org
Show quoted text
> > I've released that as another dev version now - 1.20_01 - but I'm > > thinking we should release 1.10 final first.
> > Agree - get 1.10 released first.
OK, 1.10 is out as a final now. The upcoming 1.20 (in theory) should be functionally nearly identical to 1.10, except the program has been refactored heavily. I think it makes a lot more sense internally now. I've added SYSPETE as co-maintainer, but I'm happy to take responsibility for getting 1.20 final out. I'd really appreciate help with the Windows side of things -- I don't have a test environment for it. Cheers Toby
On Thu Jan 07 18:52:33 2016, TJC wrote: Show quoted text
> > > I've released that as another dev version now - 1.20_01 - but I'm > > > thinking we should release 1.10 final first.
> > > > Agree - get 1.10 released first.
> > OK, 1.10 is out as a final now. > > The upcoming 1.20 (in theory) should be functionally nearly identical > to 1.10, except the program has been refactored heavily. I think it > makes a lot more sense internally now. > > I've added SYSPETE as co-maintainer, but I'm happy to take > responsibility for getting 1.20 final out. I'd really appreciate help > with the Windows side of things -- I don't have a test environment for > it.
1.20 passes all tests on my Windows VM using Pg 9.5 so looks good to me. I'm going to review other tickets next to see if anything else can be fixed before next release.
Resolving ticket.. Sounds like we're good here.
On Mon Jan 18 22:11:55 2016, TJC wrote: Show quoted text
> Resolving ticket.. Sounds like we're good here.
The only thing I'm unsure about with 1.20_04 is the dep on Perl5.14 dues to use of Function::Parameters. @ribasushi: is 5.14 a show-stopper for use by DBIC?
CC: ilmari [...] ilmari.org, peter [...] sysnix.com
Subject: Re: [rt.cpan.org #108460] Reproducible (albeit intermittent, roughly 7/10) failure on cleanup
Date: Fri, 22 Jan 2016 17:08:17 +0100
To: bug-Test-postgresql [...] rt.cpan.org
From: Peter Rabbitson <ribasushi [...] cpan.org>
On 01/22/2016 04:58 PM, Peter Mottram via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=108460 > > > On Mon Jan 18 22:11:55 2016, TJC wrote:
>> Resolving ticket.. Sounds like we're good here.
> The only thing I'm unsure about with 1.20_04 is the dep on Perl5.14 dues to use of Function::Parameters. > > @ribasushi: is 5.14 a show-stopper for use by DBIC?
DBIC does not depend on TestPpostgreSQL in any capacity. Whether it is reasonable to impose F::P in such a trivial dist is an entirely separate question.
RT-Send-CC: peter [...] sysnix.com, ilmari [...] ilmari.org
1.20_05 is up on CPAN incl. Peter's code to add a deprecation warning to use of the global %Defaults. Barring any further issues, I'll go about pushing this to final later this week.
On Sun Jan 31 21:59:37 2016, TJC wrote: Show quoted text
> 1.20_05 is up on CPAN incl. Peter's code to add a deprecation warning > to use of the global %Defaults. > > Barring any further issues, I'll go about pushing this to final later > this week.
Some news... Back to working on a distro I haven't touched in a while I'm seeing exceptions from DBI (bubbled up through DBIC) being thrown to STDERR after Pg is shutdown. Looks like some statement handles I haven't closed properly so not really the fault of Test::PostgreSQL but at the same time is pretty ugly. I don't think this warrants holding off on the release of 1.20 since it doesn't affect test results but I'd like to try and find a way of preventing such noise.
On Wed Feb 03 13:21:03 2016, SYSPETE wrote: Show quoted text
> Some news... > > Back to working on a distro I haven't touched in a while I'm seeing > exceptions from DBI (bubbled up through DBIC) being thrown to STDERR > after Pg is shutdown. Looks like some statement handles I haven't > closed properly so not really the fault of Test::PostgreSQL but at the > same time is pretty ugly. I don't think this warrants holding off on > the release of 1.20 since it doesn't affect test results but I'd like > to try and find a way of preventing such noise.
Cheers. I'm going to resolve this particular ticket and release 1.20, but perhaps open a new ticket with the STDERR issues. -Toby