Disable t/zzzzzzz_sqlite_deadlock.t for regular installs
[dbsrgits/DBIx-Class.git] / t / zzzzzzz_sqlite_deadlock.t
index b125d39..a049f22 100644 (file)
@@ -9,15 +9,22 @@ use File::Temp ();
 use DBICTest;
 use DBICTest::Schema;
 
-plan tests => 2;
-my $wait_for = 10;  # how many seconds to wait
+unless ( DBICTest::AuthorCheck->is_author || $ENV{AUTOMATED_TESTING} || $ENV{RELEASE_TESTING} ) {
+  plan( skip_all => "Skipping test on plain module install" );
+}
 
-# Fails on mac os *only*. Do not enable
-$TODO = "This seems to be a DBD::SQLite problem, don't test for now";
+plan tests => 2;
+my $wait_for = 30;  # how many seconds to wait
 
 for my $close (0,1) {
 
-  my $tmp = File::Temp->new( UNLINK => 1, TMPDIR => 1, SUFFIX => '.sqlite' );
+  my $tmp = File::Temp->new(
+    UNLINK => 1,
+    TMPDIR => 1,
+    SUFFIX => '.sqlite',
+    EXLOCK => 0,  # important for BSD and derivatives
+  );
+
   my $tmp_fn = $tmp->filename;
   close $tmp if $close;
 
@@ -31,7 +38,7 @@ for my $close (0,1) {
   lives_ok (sub {
     my $schema = DBICTest::Schema->connect ("DBI:SQLite:$tmp_fn");
     DBICTest->deploy_schema ($schema);
-    DBICTest->populate_schema ($schema);
+    #DBICTest->populate_schema ($schema);
   });
 
   alarm 0;