- DBIC_TRACE=1
- DBIC_TRACE_PROFILE=console_monochrome
- DBICTEST_VIA_REPLICATED=0
+ - DBICTEST_VERSION_WARNS_INDISCRIMINATELY=1
###
# Start of the allow_failures block
- DEVREL_DEPS=true
- POISON_ENV=true
- DBIC_TRACE=1
+ - DBICTEST_VERSION_WARNS_INDISCRIMINATELY=1
- BREWVER=5.8.1
# 5.8.3 with blead CPAN
- perl: devcpan_5.8.8_thr_mb
env:
- CLEANTEST=true
+ - DBICTEST_VERSION_WARNS_INDISCRIMINATELY=1
- DEVREL_DEPS=true
- BREWVER=5.8.8
- BREWOPTS="-Duseithreads -Dusemorebits"
fi
TEST_T1=$SECONDS
-if [[ -z "$DBIC_TRACE" ]] && [[ -z "$DBIC_MULTICREATE_DEBUG" ]] && [[ -s "$TEST_STDERR_LOG" ]] ; then
+if \
+ [[ -z "$DBIC_TRACE" ]] \
+&& [[ -z "$DBIC_MULTICREATE_DEBUG" ]] \
+&& [[ -z "$DBICTEST_DEBUG_CONCURRENCY_LOCKS" ]] \
+&& [[ -z "$DBICTEST_VERSION_WARNS_INDISCRIMINATELY" ]] \
+&& [[ -s "$TEST_STDERR_LOG" ]] ; then
STDERR_LOG_SIZE=$(wc -l < "$TEST_STDERR_LOG")
# prepend STDERR log
use DBICTest;
use DBIx::Class::_Util qw( sigwarn_silencer modver_gt_or_eq modver_gt_or_eq_and_lt );
+# make one deploy() round before we load anything else - need this in order
+# to prime SQLT if we are using it (deep depchain is deep)
+DBICTest->init_schema( no_populate => 1 );
+
# check that we work somewhat OK with braindead SQLite transaction handling
#
# As per https://metacpan.org/source/ADAMK/DBD-SQLite-1.37/lib/DBD/SQLite.pm#L921
#
# However DBD::SQLite 1.38_02 seems to fix this, with an accompanying test:
# https://metacpan.org/source/ADAMK/DBD-SQLite-1.38_02/t/54_literal_txn.t
-
-require DBD::SQLite;
my $lit_txn_todo = modver_gt_or_eq('DBD::SQLite', '1.38_02')
? undef
: "DBD::SQLite before 1.38_02 is retarded wrt detecting literal BEGIN/COMMIT statements"
my $schema = DBICTest->init_schema();
+# this may generate warnings under certain CI flags, hence do it outside of
+# the warnings_are below
+my $dt = DateTime->new( year => 2000, time_zone => "America/Chicago" );
+
warnings_are {
my $event = $schema->resultset("EventTZPg")->find(1);
$event->update({created_on => '2009-01-15 17:00:00+00'});
die __PACKAGE__ . " must be loaded before DBIx::Class (or modules using DBIx::Class) at $frame[1] line $frame[2]\n";
}
+
+ if ( $ENV{DBICTEST_VERSION_WARNS_INDISCRIMINATELY} ) {
+ my $ov = UNIVERSAL->can("VERSION");
+
+ require Carp;
+
+ no warnings 'redefine';
+ *UNIVERSAL::VERSION = sub {
+ Carp::carp( 'Argument "blah bleh bloh" isn\'t numeric in subroutine entry' );
+ &$ov;
+ };
+ }
}
use Path::Class qw/file dir/;
use warnings;
use strict;
+BEGIN { delete $ENV{DBICTEST_VERSION_WARNS_INDISCRIMINATELY} }
+
use DBIx::Class::_Util 'sigwarn_silencer';
use if DBIx::Class::_ENV_::BROKEN_FORK, 'threads';
BEGIN {
# just in case the user env has stuff in it
delete $ENV{JSON_ANY_ORDER};
+ delete $ENV{DBICTEST_VERSION_WARNS_INDISCRIMINATELY};
}
use Test::More;