[Koha-bugs] [Bug 21086] Wrong mock of DateTime->now in tests

2020-06-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21086
Bug 21086 depends on bug 19705, which changed state.

Bug 19705 Summary: DecreaseLoanHighHolds.t is still failing randomly
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19705

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 21086] Wrong mock of DateTime->now in tests

2020-06-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21086
Bug 21086 depends on bug 19705, which changed state.

Bug 19705 Summary: DecreaseLoanHighHolds.t is still failing randomly
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19705

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 21086] Wrong mock of DateTime->now in tests

2018-08-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21086

Martin Renvoize  changed:

   What|Removed |Added

 Status|Pushed to Master|RESOLVED
 CC||martin.renvoize@ptfs-europe
   ||.com
 Resolution|--- |FIXED

--- Comment #5 from Martin Renvoize  ---
Depends on bug 20287 not in 18.05.x series, will not be backported.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 21086] Wrong mock of DateTime->now in tests

2018-08-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21086
Bug 21086 depends on bug 20287, which changed state.

Bug 20287 Summary: Move AddMember and ModMember to Koha::Patron
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20287

   What|Removed |Added

 Status|Pushed to Master|RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 21086] Wrong mock of DateTime->now in tests

2018-07-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21086

Nick Clemens  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to Master
 CC||n...@bywatersolutions.com

--- Comment #4 from Nick Clemens  ---
Awesome work all!

Pushed to master for 18.11

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 21086] Wrong mock of DateTime->now in tests

2018-07-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21086

Josef Moravec  changed:

   What|Removed |Added

 QA Contact|testo...@bugs.koha-communit |josef.mora...@gmail.com
   |y.org   |
 CC||josef.mora...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 21086] Wrong mock of DateTime->now in tests

2018-07-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21086

Josef Moravec  changed:

   What|Removed |Added

  Attachment #77098|0   |1
is obsolete||

--- Comment #3 from Josef Moravec  ---
Created attachment 77101
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77101=edit
Bug 21086: Fix wrong mock of DateTime->now

prove t/db_dependent/DecreaseLoanHighHolds.t
t/db_dependent/DecreaseLoanHighHolds.t .. 1/17 Can't locate object method
 "truncate" via package "80" (perhaps you forgot to load "80"?) at
/home/vagrant/kohaclone/C4/Circulation.pm line 3497.

What is happening:
We mock DateTime->now in the script to avoid the date comparaisons to fail on
slow servers (see bug 19705).

  my $now_value   = DateTime->now();
  my $mocked_datetime = Test::MockModule->new('DateTime');
  $mocked_datetime->mock( 'now', sub { return $now_value; } );

Since bug 20287, we have the following calls:
Koha::Patron->store => Koha::Patron::Category->get_expiry_date

which does:
221 return $date->add( months => $self->enrolmentperiod, end_of_month
=> 'limit' );

as enrolmentperiod is generated by t::lib::TestBuilder, it can be quite big,
and so
the date change from one call to the others.

The failure is actually coming from the date becoming > , which is not
handled correctly,
on purpose, by Koha::DateUtils (infinite)

On the way this patch fixes the other occurrence, in Sitemapper.t (just in
case)

Test plan:
Make sure the tests pass now.

Signed-off-by: Katrin Fischer 

Signed-off-by: Josef Moravec 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 21086] Wrong mock of DateTime->now in tests

2018-07-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21086

Josef Moravec  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 21086] Wrong mock of DateTime->now in tests

2018-07-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21086

Katrin Fischer  changed:

   What|Removed |Added

   Patch complexity|--- |Small patch
 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 21086] Wrong mock of DateTime->now in tests

2018-07-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21086

Katrin Fischer  changed:

   What|Removed |Added

  Attachment #77093|0   |1
is obsolete||

--- Comment #2 from Katrin Fischer  ---
Created attachment 77098
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77098=edit
Bug 21086: Fix wrong mock of DateTime->now

prove t/db_dependent/DecreaseLoanHighHolds.t
t/db_dependent/DecreaseLoanHighHolds.t .. 1/17 Can't locate object method
 "truncate" via package "80" (perhaps you forgot to load "80"?) at
/home/vagrant/kohaclone/C4/Circulation.pm line 3497.

What is happening:
We mock DateTime->now in the script to avoid the date comparaisons to fail on
slow servers (see bug 19705).

  my $now_value   = DateTime->now();
  my $mocked_datetime = Test::MockModule->new('DateTime');
  $mocked_datetime->mock( 'now', sub { return $now_value; } );

Since bug 20287, we have the following calls:
Koha::Patron->store => Koha::Patron::Category->get_expiry_date

which does:
221 return $date->add( months => $self->enrolmentperiod, end_of_month
=> 'limit' );

as enrolmentperiod is generated by t::lib::TestBuilder, it can be quite big,
and so
the date change from one call to the others.

The failure is actually coming from the date becoming > , which is not
handled correctly,
on purpose, by Koha::DateUtils (infinite)

On the way this patch fixes the other occurrence, in Sitemapper.t (just in
case)

Test plan:
Make sure the tests pass now.

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 21086] Wrong mock of DateTime->now in tests

2018-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21086

--- Comment #1 from Jonathan Druart  
---
Created attachment 77093
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77093=edit
Bug 21086: Fix wrong mock of DateTime->now

prove t/db_dependent/DecreaseLoanHighHolds.t
t/db_dependent/DecreaseLoanHighHolds.t .. 1/17 Can't locate object method
 "truncate" via package "80" (perhaps you forgot to load "80"?) at
/home/vagrant/kohaclone/C4/Circulation.pm line 3497.

What is happening:
We mock DateTime->now in the script to avoid the date comparaisons to fail on
slow servers (see bug 19705).

  my $now_value   = DateTime->now();
  my $mocked_datetime = Test::MockModule->new('DateTime');
  $mocked_datetime->mock( 'now', sub { return $now_value; } );

Since bug 20287, we have the following calls:
Koha::Patron->store => Koha::Patron::Category->get_expiry_date

which does:
221 return $date->add( months => $self->enrolmentperiod, end_of_month
=> 'limit' );

as enrolmentperiod is generated by t::lib::TestBuilder, it can be quite big,
and so
the date change from one call to the others.

The failure is actually coming from the date becoming > , which is not
handled correctly,
on purpose, by Koha::DateUtils (infinite)

On the way this patch fixes the other occurrence, in Sitemapper.t (just in
case)

Test plan:
Make sure the tests pass now.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 21086] Wrong mock of DateTime->now in tests

2018-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21086

Jonathan Druart  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/