Bug#923824: libdancer2-plugin-database-perl: FTBFS randomly (failing tests)

Étienne Mollier emollier at emlwks999.eu
Tue Feb 21 21:36:02 GMT 2023


Control: tags -1 patch

It turned out I managed to find a workaround.  Putting it below
for ulterior reference if need be; few more details are
available on upstream bug tracker:

-------8<--------------8<--------------8<--------------8<-------
--- libdancer2-plugin-database-perl.orig/t/lib/TestApp.pm
+++ libdancer2-plugin-database-perl/t/lib/TestApp.pm
@@ -209,6 +209,9 @@
     var connection_failed => 1;
 };
 get '/database_connection_failed_fires' => sub {
+    # Avoid catching an old handle which may not have expired yet
+    database()->disconnect;
+    sleep 0.2;
     # Give a ridiculous database filename which should never exist in order to
     # force a connection failure
     my $handle = database({ 
------->8-------------->8-------------->8-------------->8-------

Have a nice day,  :)
-- 
Étienne Mollier <emollier at emlwks999.eu>
Fingerprint:  8f91 b227 c7d6 f2b1 948c  8236 793c f67e 8f0d 11da
Sent from /dev/pts/3, please excuse my verbosity.
On air: Chicago - Beginnings
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-perl-maintainers/attachments/20230221/f2bc7739/attachment.sig>


More information about the pkg-perl-maintainers mailing list