From 77589b549c1b355cbf0fe0748fbaef76c8ec684f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Tue, 29 Dec 2015 15:46:17 +0100 Subject: [PATCH] Track down last 3 failing tests on Jenkins - Fix t/DateUtils.t - t/db_dependent/TestBuilder.t Upgrade this test verbosity in order to find out on which data source it fails on Jenkins. --- t/DateUtils.t | 4 ++-- t/db_dependent/TestBuilder.t | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/t/DateUtils.t b/t/DateUtils.t index 4f7c773789..1f9a6aa530 100755 --- a/t/DateUtils.t +++ b/t/DateUtils.t @@ -76,11 +76,11 @@ for ( qw/ 2014-01-01 2100-01-01 9999-01-01 / ) { my $duration = gettimeofday(); $new_dt = dt_from_string($_, 'iso', $dear_dirty_dublin); $duration = gettimeofday() - $duration; - cmp_ok $duration, '<', 1, "Create DateTime with dt_from_string() for $_ with TZ in less than 1s"; + cmp_ok $duration, '<', 4, "Create DateTime with dt_from_string() for $_ with TZ in less than 4s"; $duration = gettimeofday(); output_pref( { dt => $new_dt } ); $duration = gettimeofday() - $duration; - cmp_ok $duration, '<', 1, "Create DateTime with output_pref() for $_ with TZ in less than 1s"; + cmp_ok $duration, '<', 4, "Create DateTime with output_pref() for $_ with TZ in less than 4s"; } $new_dt = dt_from_string( '2011-06-16 12:00', 'sql' ); diff --git a/t/db_dependent/TestBuilder.t b/t/db_dependent/TestBuilder.t index bec4834b25..330af20d8e 100644 --- a/t/db_dependent/TestBuilder.t +++ b/t/db_dependent/TestBuilder.t @@ -18,7 +18,7 @@ # along with Koha; if not, see . use Modern::Perl; -use Test::More tests => 41; +use Test::More; BEGIN { use_ok('t::lib::TestBuilder'); @@ -30,12 +30,10 @@ my $builder = t::lib::TestBuilder->new(); is( $builder->build(), undef, 'build without arguments returns undef' ); my @sources = $builder->schema->sources; -my $nb_failure = 0; for my $source (@sources) { eval { $builder->build( { source => $source } ); }; - $nb_failure++ if ($@); + ok( !$@, "create an entry for source '$source'"); } -is( $nb_failure, 0, 'TestBuilder can create a entry for every sources' ); my $my_overduerules_transport_type = { message_transport_type => { @@ -248,3 +246,5 @@ $bookseller = $builder->build({ delete $bookseller->{_fk}; $bookseller_from_db = $rs_aqbookseller->find($bookseller); is( $bookseller_from_db->in_storage, 1, 'build with only_fk = 0 stores the entry correctly' ); + +done_testing; -- 2.20.1