Bugzilla – Attachment 98431 Details for
Bug 23673
Separate time sent from time created in message_queue table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23673: Avoid sleep in tests
Bug-23673-Avoid-sleep-in-tests.patch (text/plain), 1.83 KB, created by
Jonathan Druart
on 2020-02-05 08:45:14 UTC
(
hide
)
Description:
Bug 23673: Avoid sleep in tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-02-05 08:45:14 UTC
Size:
1.83 KB
patch
obsolete
>From fc86fb50455ea5edcd308643bf6abcfb8f5c880c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 5 Feb 2020 09:44:58 +0100 >Subject: [PATCH] Bug 23673: Avoid sleep in tests > >--- > t/db_dependent/Letters.t | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t >index 6353f9c07d..bdeed6ead6 100644 >--- a/t/db_dependent/Letters.t >+++ b/t/db_dependent/Letters.t >@@ -135,9 +135,10 @@ is( $messages->[0]->{status}, 'pending', 'EnqueueLetter stores the status pendin > 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' ); > >-my $message_time_queued = $messages->[0]->{time_queued}; >+# Setting time_queued to something else than now >+my $yesterday = dt_from_string->subtract( days => 1 ); >+Koha::Notice::Messages->find($messages->[0]->{message_id})->time_queued($yesterday)->store; > >-sleep 1; > # SendQueuedMessages > my $messages_processed = C4::Letters::SendQueuedMessages( { type => 'email' }); > is($messages_processed, 0, 'No queued messages processed if type limit passed with unused type'); >@@ -150,7 +151,7 @@ is( > 'message marked failed if tried to send SMS message for borrower with no smsalertnumber set (bug 11208)' > ); > isnt($messages->[0]->{updated_on}, $messages->[0]->{time_queued}, 'Time status changed differs from time queued when status changes' ); >-is($messages->[0]->{time_queued}, $message_time_queued, 'Time queued remaines inmutable' ); >+is(dt_from_string($messages->[0]->{time_queued}), $yesterday, 'Time queued remaines inmutable' ); > > # ResendMessage > my $resent = C4::Letters::ResendMessage($messages->[0]->{message_id}); >-- >2.11.0
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 23673
:
94503
|
94504
|
94954
|
96232
|
96346
|
96347
|
96391
|
96392
|
96451
|
96452
|
96643
|
98090
|
98091
|
98419
|
98420
|
98431
|
98432
|
98433
|
98434
|
98435