)],
};
-if (DBIx::Class::_ENV_::DBICTEST) {
+# this only happens during DBIC-internal testing
+if ( $INC{"t/lib/ANFANG.pm"} ) {
my $seen;
for my $type (keys %$method_dispatch) {
UNSTABLE_DOLLARAT => ( "$]" < 5.013002 ) ? 1 : 0,
- DBICTEST => $INC{"DBICTest/Util.pm"} ? 1 : 0,
-
- # During 5.13 dev cycle HELEMs started to leak on copy
- # add an escape for these perls ON SMOKERS - a user will still get death
- PEEPEENESS => ( eval { DBICTest::RunMode->is_smoker } && ( "$]" >= 5.013005 and "$]" <= 5.013006) ),
-
( map
#
# the "DBIC_" prefix below is crucial - this is what makes CI pick up
use warnings;
use Test::More;
+BEGIN {
+ require DBICTest::Util;
+ plan skip_all => "Your perl version $] appears to leak like a sieve - skipping test"
+ if DBICTest::Util::PEEPEENESS();
+}
use DBICTest::RunMode;
use DBICTest::Util::LeakTracer qw(populate_weakregistry assert_empty_weakregistry visit_refs);
use Scalar::Util qw(weaken blessed reftype);
use DBIx::Class::_Util qw(hrefaddr sigwarn_silencer modver_gt_or_eq modver_gt_or_eq_and_lt);
-BEGIN {
- plan skip_all => "Your perl version $] appears to leak like a sieve - skipping test"
- if DBIx::Class::_ENV_::PEEPEENESS;
-}
-
my $TB = Test::More->builder;
if ($ENV{DBICTEST_IN_PERSISTENT_ENV}) {
use DBI::Const::GetInfoType;
use Scalar::Util qw/weaken/;
-
+use DBICTest::Util 'PEEPEENESS';
use DBICTest;
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MYSQL_${_}" } qw/DSN USER PASS/};
{
local $TODO = "Perl $] is known to leak like a sieve"
- if DBIx::Class::_ENV_::PEEPEENESS;
+ if PEEPEENESS;
ok (! defined $orig_dbh, 'Parent $dbh handle is gone');
}
{
local $TODO = "Perl $] is known to leak like a sieve"
- if DBIx::Class::_ENV_::PEEPEENESS;
+ if PEEPEENESS;
ok (! defined $orig_dbh, 'DBIC operation triggered reconnect - old $dbh is gone');
}
use strict;
use warnings;
+
# this noop trick initializes the STDOUT, so that the TAP::Harness
# issued IO::Select->can_read calls (which are blocking wtf wtf wtf)
# keep spinning and scheduling jobs
}
-use DBICTest::Util qw( local_umask tmpdir await_flock dbg DEBUG_TEST_CONCURRENCY_LOCKS );
-use DBICTest::Schema;
+use DBICTest::Util qw(
+ local_umask tmpdir await_flock
+ dbg DEBUG_TEST_CONCURRENCY_LOCKS PEEPEENESS
+);
use DBICTest::Util::LeakTracer qw/populate_weakregistry assert_empty_weakregistry/;
+use DBICTest::Schema;
use DBIx::Class::_Util qw( detected_reinvoked_destructor scope_guard );
use Carp;
use Path::Class::File ();
return if (
# this perl leaks handles, delaying DESTROY, can't work right
- DBIx::Class::_ENV_::PEEPEENESS
+ PEEPEENESS
or
! -f $db_file
);
use ANFANG;
-use constant DEBUG_TEST_CONCURRENCY_LOCKS =>
- ( ($ENV{DBICTEST_DEBUG_CONCURRENCY_LOCKS}||'') =~ /^(\d+)$/ )[0]
- ||
- 0
-;
+use DBICTest::RunMode;
+
+use constant {
+
+ DEBUG_TEST_CONCURRENCY_LOCKS => (
+ ( ($ENV{DBICTEST_DEBUG_CONCURRENCY_LOCKS}||'') =~ /^(\d+)$/ )[0]
+ ||
+ 0
+ ),
+
+ # During 5.13 dev cycle HELEMs started to leak on copy
+ # add an escape for these perls ON SMOKERS - a user/CI will still get death
+ # constname a homage to http://theoatmeal.com/comics/working_home
+ PEEPEENESS => (
+ DBICTest::RunMode->is_smoker
+ and
+ ! DBICTest::RunMode->is_ci
+ and
+ ( "$]" >= 5.013005 and "$]" <= 5.013006)
+ ),
+};
use Config;
use Carp qw(cluck confess croak);
our @EXPORT_OK = qw(
dbg stacktrace
local_umask tmpdir find_co_root
- visit_namespaces
+ visit_namespaces PEEPEENESS
check_customcond_args
await_flock DEBUG_TEST_CONCURRENCY_LOCKS
);
use Test::Warn;
use Test::Exception;
-
+use DBICTest::Util 'PEEPEENESS';
use DBICTest;
for my $conn_args (
# exception fallback:
SKIP: {
- if ( !!DBIx::Class::_ENV_::PEEPEENESS ) {
- skip "Your perl version $] appears to leak like a sieve - skipping garbage collected \$schema test", 1;
- }
+ skip "Your perl version $] appears to leak like a sieve - skipping garbage collected \$schema test", 1
+ if PEEPEENESS;
undef ($schema);
throws_ok (
Sub::Defer
Sub::Quote
- File::Spec
Scalar::Util
List::Util
Storable