Summary: | TemplateToolkit.t is failing on slow server | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, martin.renvoize, nick |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 21238: Prevent TemplateToolkit.t to fail on slow servers
Bug 21238: Prevent TemplateToolkit.t to fail on slow servers Bug 21238: Prevent TemplateToolkit.t to fail on slow servers Bug 21238: Prevent TemplateToolkit.t to fail on slow servers |
Description
Jonathan Druart
2018-08-16 15:29:32 UTC
Created attachment 77934 [details] [review] Bug 21238: Prevent TemplateToolkit.t to fail on slow servers It failed 3x in the last 6 runs (on node 1), we should mock DateTime->now to prevent it to fail again. The error is: koha_1 | # Failed test at t/db_dependent/Letters/TemplateToolkit.t line 724. When comparing <<today>> replacement: koha_1 | # 08/16/2018 14:25<br /> [...] koha_1 | # 08/16/2018 14:24<br /> Let's mock DateTime->now to prevent it to fail again. Test plan: 0. Do not apply this patch 1. Add "sleep(60);" at line ~715, before "# Add a second checkout" 2. Run the tests => Fail! 3. Apply this patch 4. Run the tests again => Pass! Created attachment 77935 [details] [review] Bug 21238: Prevent TemplateToolkit.t to fail on slow servers It failed 3x in the last 6 runs (on node 1), we should mock DateTime->now to prevent it to fail again. The error is: koha_1 | # Failed test at t/db_dependent/Letters/TemplateToolkit.t line 724. When comparing <<today>> replacement: koha_1 | # 08/16/2018 14:25<br /> [...] koha_1 | # 08/16/2018 14:24<br /> Let's mock DateTime->now to prevent it to fail again. Test plan: 0. Do not apply this patch 1. Add "sleep(60);" at line ~715, before "# Add a second checkout" 2. Run the tests => Fail! 3. Apply this patch 4. Run the tests again => Pass! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Sensible fix, works as expected. Signing Off Created attachment 77958 [details] [review] Bug 21238: Prevent TemplateToolkit.t to fail on slow servers It failed 3x in the last 6 runs (on node 1), we should mock DateTime->now to prevent it to fail again. The error is: koha_1 | # Failed test at t/db_dependent/Letters/TemplateToolkit.t line 724. When comparing <<today>> replacement: koha_1 | # 08/16/2018 14:25<br /> [...] koha_1 | # 08/16/2018 14:24<br /> Let's mock DateTime->now to prevent it to fail again. Test plan: 0. Do not apply this patch 1. Add "sleep(60);" at line ~715, before "# Add a second checkout" 2. Run the tests => Fail! 3. Apply this patch 4. Run the tests again => Pass! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 77959 [details] [review] Bug 21238: Prevent TemplateToolkit.t to fail on slow servers It failed 3x in the last 6 runs (on node 1), we should mock DateTime->now to prevent it to fail again. The error is: koha_1 | # Failed test at t/db_dependent/Letters/TemplateToolkit.t line 724. When comparing <<today>> replacement: koha_1 | # 08/16/2018 14:25<br /> [...] koha_1 | # 08/16/2018 14:24<br /> Let's mock DateTime->now to prevent it to fail again. Test plan: 0. Do not apply this patch 1. Add "sleep(60);" at line ~715, before "# Add a second checkout" 2. Run the tests => Fail! 3. Apply this patch 4. Run the tests again => Pass! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Awesome work all! Pushed to master for 18.11 Pushed to 18.05.x for 18.05.03, thanks Jonathan! Pushed to 17.11.x for 17.11.10 |