Bug 15445 DateUtils.t fails on Jenkins due to server sluggishness
authorFrédéric Demians <f.demians@tamil.fr>
Wed, 30 Dec 2015 15:29:03 +0000 (16:29 +0100)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Tue, 8 Mar 2016 21:55:16 +0000 (21:55 +0000)
Jenkins server is abnormally slow to perform a task done in less than
1s elsewhere. The test stay valid by giving just a bit more time to Jenkins
server.

TO TEST:
- Confirm that the two test hasn't changed. They the just get 4s to
  perform
- Push the patch to master and observe that DateUtils.t doesn't fail
  anymore.

NOTE: Also passed koha qa test tools too.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended: Changed to 2s, should be enough

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>

t/DateUtils.t

index b82ed02..eede4a0 100755 (executable)
@@ -79,11 +79,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, '<', 2, "Create DateTime with dt_from_string() for $_ with TZ in less than 2s";
     $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, '<', 2, "Create DateTime with output_pref() for $_ with TZ in less than 2s";
 }
 
 $new_dt = dt_from_string( '2011-06-16 12:00', 'sql' );