Permalink
Browse files

Do not grab a global lock if test won't run

  • Loading branch information...
1 parent 8893ffd commit ad7fbbc0624b6572adf454d8eaa9aec474278a15 @ribasushi ribasushi committed Dec 11, 2012
Showing with 12 additions and 8 deletions.
  1. +12 −8 t/zzzzzzz_perl_perf_bug.t
View
20 t/zzzzzzz_perl_perf_bug.t
@@ -1,8 +1,19 @@
use strict;
use warnings;
use Test::More;
-use Benchmark;
use lib qw(t/lib);
+
+BEGIN {
+ plan skip_all =>
+ 'Skipping RH perl performance bug tests as DBIC_NO_WARN_BAD_PERL set'
+ if ( $ENV{DBIC_NO_WARN_BAD_PERL} );
+
+ require DBICTest::RunMode;
+ plan skip_all => 'Skipping as system appears to be a smoker'
+ if DBICTest::RunMode->is_smoker;
+}
+
+use Benchmark;
use DBICTest ':GlobalLock';
# This is a rather unusual test.
@@ -19,13 +30,6 @@ use DBICTest ':GlobalLock';
# Perl Performance Issues on Red Hat Systems in
# L<DBIx::Class::Manual::Troubleshooting>
-plan skip_all =>
- 'Skipping RH perl performance bug tests as DBIC_NO_WARN_BAD_PERL set'
- if ( $ENV{DBIC_NO_WARN_BAD_PERL} );
-
-plan skip_all => 'Skipping as system appears to be a smoker'
- if DBICTest::RunMode->is_smoker;
-
plan tests => 3;
ok( 1, 'Dummy - prevents next test timing out' );

0 comments on commit ad7fbbc

Please sign in to comment.