Bug 18794: Fix test ListMetadataFormats in OAI/Server.t

This test may fail on slow servers, it compares the response date with
'now', but both can differ a bit.

https://jenkins.koha-community.org/job/Koha_Master_D8/198/consoleFull

   Failed test 'ListMetadataFormats'
   at t/db_dependent/OAI/Server.t line 150.
     Structures begin differing at:
          $got->{responseDate} = '2017-06-12T14:31:51Z'
     $expected->{responseDate} = '2017-06-12T14:31:50Z'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2017-06-12 18:56:45 -03:00
parent a80ed84d07
commit 1b3f0c798b

View file

@ -131,7 +131,6 @@ sub test_query {
%$expected,
(
request => 'http://localhost',
responseDate => DateTime->now . 'Z',
xmlns => 'http://www.openarchives.org/OAI/2.0/',
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
'xsi:schemaLocation' => 'http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd',
@ -147,6 +146,7 @@ sub test_query {
$response = XMLin($stdout);
}
delete $response->{responseDate};
unless (is_deeply($response, \%full_expected, $test)) {
diag
"PARAM:" . Dump($param) .