Summary: | Test t/db_dependent/Patrons.t can fail randomly | ||
---|---|---|---|
Product: | Koha | Reporter: | Josef Moravec <josef.moravec> |
Component: | Test Suite | Assignee: | Chris Cormack <chris> |
Status: | CLOSED FIXED | QA Contact: | Galen Charlton <gmcharlt> |
Severity: | normal | ||
Priority: | P5 - low | CC: | chris.kirby, jonathan.druart+koha, katrin.fischer, kyle, mtj |
Version: | master | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Bug Depends on: | |||
Bug Blocks: | 25551 | ||
Attachments: |
Bug 17742: Fix t/db_dependent/Patrons.t
Bug 17742: Fix t/db_dependent/Patrons.t Bug 17742: Fix t/db_dependent/Patrons.t Bug 17742: Fix t/db_dependent/Patrons.t Bug 17742: Fix t/db_dependent/Patrons.t Bug 17742: Fix t/db_dependent/Patrons.t Bug 17742: Use TestBuilder to create the library and patron category |
Description
Josef Moravec
2016-12-07 21:42:23 UTC
Created attachment 58033 [details] [review] Bug 17742: Fix t/db_dependent/Patrons.t Moves the getting of testing date for updated_on just after the storing the test patron data to make the gap between generating data and now date as short as possible Changes test #7 to the one which was probably originally intended Test plan 1. prove t/db_dependent/Patrons.t 2. read the diff Created attachment 58085 [details] [review] Bug 17742: Fix t/db_dependent/Patrons.t Moves the getting of testing date for updated_on just after the storing the test patron data to make the gap between generating data and now date as short as possible Changes test #7 to the one which was probably originally intended Test plan 1. prove t/db_dependent/Patrons.t 2. read the diff Signed-off-by: Chris Kirby <chris.kirby@ilsleypubliclibrary.org> Tests passed. (In reply to Chris Kirby from comment #2) > Changes test #7 to the one which was probably originally intended No, the original test was good. We want to check that the updated_on value has been updated when a patron is modified. (In reply to Jonathan Druart from comment #3) > (In reply to Chris Kirby from comment #2) > > Changes test #7 to the one which was probably originally intended > > No, the original test was good. We want to check that the updated_on value > has been updated when a patron is modified. But shouldn't it be tested on $b3_new? (In reply to Josef Moravec from comment #4) > (In reply to Jonathan Druart from comment #3) > > (In reply to Chris Kirby from comment #2) > > > Changes test #7 to the one which was probably originally intended > > > > No, the original test was good. We want to check that the updated_on value > > has been updated when a patron is modified. > > But shouldn't it be tested on $b3_new? Yes it should. Created attachment 58148 [details] [review] Bug 17742: Fix t/db_dependent/Patrons.t Moves the getting of testing date for updated_on just after the storing the test patron data to make the gap between generating data and now date as short as possible Fixes test 7 Use Koha::Database instead of C4::Context->dbh Test plan 1. prove t/db_dependent/Patrons.t 2. read the diff Signed-off-by: Chris Kirby <chris.kirby@ilsleypubliclibrary.org> Tests passed. (In reply to Jonathan Druart from comment #3) > (In reply to Chris Kirby from comment #2) > > Changes test #7 to the one which was probably originally intended > > No, the original test was good. We want to check that the updated_on value > has been updated when a patron is modified. I change the back to original test, fix it (I hope), now it's tested on firstname, instead of surname, which is needed in later test... and maked the tests use Koha::Database instead of C4:Context->dbh; Created attachment 58150 [details] [review] Bug 17742: Fix t/db_dependent/Patrons.t Moves the getting of testing date for updated_on just after the storing the test patron data to make the gap between generating data and now date as short as possible Fixes test 7 Use Koha::Database instead of C4::Context->dbh Test plan 1. prove t/db_dependent/Patrons.t 2. read the diff Created attachment 58460 [details] [review] Bug 17742: Fix t/db_dependent/Patrons.t Moves the getting of testing date for updated_on just after the storing the test patron data to make the gap between generating data and now date as short as possible Fixes test 7 Use Koha::Database instead of C4::Context->dbh Test plan 1. prove t/db_dependent/Patrons.t 2. read the diff NOTE: Only minor improvement could be using test builder to generate the category and branch codes, rather than assume data exists. However, that is beyond scope of this bug. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Created attachment 58462 [details] [review] Bug 17742: Fix t/db_dependent/Patrons.t Moves the getting of testing date for updated_on just after the storing the test patron data to make the gap between generating data and now date as short as possible Fixes test 7 Use Koha::Database instead of C4::Context->dbh Test plan 1. prove t/db_dependent/Patrons.t 2. read the diff NOTE: Only minor improvement could be using test builder to generate the category and branch codes, rather than assume data exists. However, that is beyond scope of this bug. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Created attachment 58463 [details] [review] Bug 17742: Use TestBuilder to create the library and patron category Moreover we do not need to remove the existing issues and patrons Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Pushed to master for 17.05, thanks Josef, Jonathan! These patches have been pushed to 16.11.x and will be in 16.11.02. Pushed to 16.05.x, for 16.05.08 release |