Bugzilla – Attachment 177676 Details for
Bug 38474
t/db_dependent/Letters.t can fail randomly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38474: Prevent Letters.t to fail on slow server
Bug-38474-Prevent-Letterst-to-fail-on-slow-server.patch (text/plain), 1.61 KB, created by
Jonathan Druart
on 2025-02-10 11:59:19 UTC
(
hide
)
Description:
Bug 38474: Prevent Letters.t to fail on slow server
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-02-10 11:59:19 UTC
Size:
1.61 KB
patch
obsolete
>From 572cfe1aa2ca349c7ef11c11504de528cde31c15 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 10 Feb 2025 12:58:46 +0100 >Subject: [PATCH] Bug 38474: Prevent Letters.t to fail on slow server > >We must always use t::lib::Dates::compare when we compare dates in >tests. >--- > t/db_dependent/Letters.t | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t >index a1526f8e222..70f51d9ffa6 100755 >--- a/t/db_dependent/Letters.t >+++ b/t/db_dependent/Letters.t >@@ -29,6 +29,8 @@ use Email::Sender::Failure; > > use MARC::Record; > >+use t::lib::Dates; >+ > use utf8; > > my ( $email_object, $sendmail_params ); >@@ -153,7 +155,10 @@ is( $messages->[0]->{content}, $my_message->{letter}->{content}, 'EnqueueLetter > is( $messages->[0]->{message_transport_type}, $my_message->{message_transport_type}, 'EnqueueLetter stores the message type correctly' ); > is( $messages->[0]->{status}, 'pending', 'EnqueueLetter stores the status pending correctly' ); > isnt( $messages->[0]->{time_queued}, undef, 'Time queued inserted by default in message_queue table' ); >-is( $messages->[0]->{updated_on}, $messages->[0]->{time_queued}, 'Time status changed equals time queued when created in message_queue table' ); >+is( >+ t::lib::Dates::compare( $messages->[0]->{updated_on}, $messages->[0]->{time_queued} ), 0, >+ 'Time status changed equals time queued when created in message_queue table' >+); > is( $messages->[0]->{failure_code}, '', 'Failure code for successful message correctly empty'); > > # Setting time_queued to something else than now >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38474
: 177676