Skip Menu |

This queue is for tickets about the Tie-DBIx-Class CPAN distribution.

Report information
The Basics
Id: 76415
Status: new
Priority: 0/
Queue: Tie-DBIx-Class

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

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



Subject: File locking problems on BSD systems
The test suite fails on all BSD systems, see http://matrix.cpantesters.org/?dist=Tie-DBIx-Class-0.01 Looking at one of the reports it seems like the usual file locking problem when using a File::Temp-generated temporary file with SQLite. The usual fix is to turn off File::Temp's automatic locking (see its documentation). Regards, Slaven
On 2012-04-08 14:02:36, SREZIC wrote: Show quoted text
> The test suite fails on all BSD systems, see > http://matrix.cpantesters.org/?dist=Tie-DBIx-Class-0.01 > Looking at one of the reports it seems like the usual file locking > problem when using a File::Temp-generated temporary file with SQLite. > The usual fix is to turn off File::Temp's automatic locking (see its > documentation). >
Attached a patch to solve the problem. Shouldn't have an impact on Linux and other OSes.
Subject: Tie-DBIx-Class-0.01-RT76415.patch
From 9c026573c827cae973fc06a37b4f2d7d5157134c Mon Sep 17 00:00:00 2001 From: Slaven Rezic <slaven@rezic.de> Date: Wed, 11 Nov 2015 21:10:16 +0100 Subject: [PATCH] no locking, especially for BSD systems (fixes RT #76415) --- t/02-dbi_sqlite.t | 2 +- t/03_object.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/t/02-dbi_sqlite.t b/t/02-dbi_sqlite.t index 2a39eab..b9da135 100644 --- a/t/02-dbi_sqlite.t +++ b/t/02-dbi_sqlite.t @@ -7,7 +7,7 @@ use Test::More tests => 31; use_ok ('File::Temp'); -my $dbfile_fh = File::Temp->new(UNLINK => 1); +my $dbfile_fh = File::Temp->new(UNLINK => 1, EXLOCK => 0); my $dbfile = $dbfile_fh->filename; ok(defined($dbfile),"temp db file is ".$dbfile); diff --git a/t/03_object.t b/t/03_object.t index 90bd298..1688317 100644 --- a/t/03_object.t +++ b/t/03_object.t @@ -7,7 +7,7 @@ use Test::More tests => 14; use_ok ('File::Temp'); -my $dbfile_fh = File::Temp->new(UNLINK => 1); +my $dbfile_fh = File::Temp->new(UNLINK => 1, EXLOCK => 0); my $dbfile = $dbfile_fh->filename; ok(defined($dbfile),"temp db file is ".$dbfile); -- 2.1.2