Bugzilla – Attachment 159227 Details for
Bug 35393
Fix Objects.t for a Jenkins failure when run just after midnight
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35393: Fix Objects.t - filter_by_last_update
Bug-35393-Fix-Objectst---filterbylastupdate.patch (text/plain), 2.18 KB, created by
Marcel de Rooy
on 2023-11-24 07:30:53 UTC
(
hide
)
Description:
Bug 35393: Fix Objects.t - filter_by_last_update
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-11-24 07:30:53 UTC
Size:
2.18 KB
patch
obsolete
>From 0f83ddc6dc746ab42d1921b5ad51d6f22f3d2cfe Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 24 Nov 2023 07:22:48 +0000 >Subject: [PATCH] Bug 35393: Fix Objects.t - filter_by_last_update >Content-Type: text/plain; charset=utf-8 > >Test plan: >Keep awake until just after midnight :) >Run t/db_dependent/Koha/Objects.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Koha/Objects.t | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/t/db_dependent/Koha/Objects.t b/t/db_dependent/Koha/Objects.t >index 9891b37896..a868b5c3d0 100755 >--- a/t/db_dependent/Koha/Objects.t >+++ b/t/db_dependent/Koha/Objects.t >@@ -1191,7 +1191,7 @@ subtest "filter_by_last_update" => sub { > subtest 'Parameters older_than, younger_than' => sub { > my $now = dt_from_string(); > my $rs = Koha::Patrons->search( { borrowernumber => { -in => \@borrowernumbers } } ); >- $rs->update( { updated_on => $now->clone->subtract( hours => 25 ) } ); >+ $rs->update( { updated_on => $now->clone->subtract( hours => 24 ) } ); > is( > $rs->filter_by_last_update( { timestamp_column_name => 'updated_on', from => $now } )->count, 0, > 'All updated yesterday' >@@ -1208,17 +1208,17 @@ subtest "filter_by_last_update" => sub { > ); > is( > $rs->filter_by_last_update( >- { timestamp_column_name => 'updated_on', from => $now->clone->subtract( days => 1 ), } >+ { timestamp_column_name => 'updated_on', from => $now->clone->subtract( minutes => 24 * 60 - 1 ), } > )->count, > 0, >- 'Yesterday, not truncated, one hour too late' >+ 'Yesterday + 1m, not truncated, no results' > ); > is( > $rs->filter_by_last_update( >- { timestamp_column_name => 'updated_on', from => $now->clone->subtract( hours => 25 ), } >+ { timestamp_column_name => 'updated_on', from => $now->clone->subtract( hours => 24 ), } > )->count, > 6, >- 'Yesterday - 1h, not truncated, within time frame' >+ 'Yesterday, not truncated, results' > ); > }; > >-- >2.30.2
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 35393
:
159226
| 159227