On Jenkins server two t/DateUtils.t test are failing with this message: Failed test 'Create DateTime with dt_from_string() for 2100-01-01 with TZ in less than 1s' at t/DateUtils.t line 82. '1.00921106338501' < '1' It means that the server is abnormally slow to perform a task done in less than 1s elsewhere. The test would stay valid by giving just a bit more time to Jenkins server.
Created attachment 46089 [details] [review] Bug 15445 DateUtils.t fails on Jenkins due to server sluggishness Jenkins server is abnormally slow to perform a task done in less than 1s elsewhere. The test stay valid by giving just a bit more time to Jenkins server. TO TEST: - Confirm that the two test hasn't changed. They the just get 4s to perform - Push the patch to master and observe that DateUtils.t doesn't fail anymore.
Created attachment 46172 [details] [review] Bug 15445 DateUtils.t fails on Jenkins due to server sluggishness Jenkins server is abnormally slow to perform a task done in less than 1s elsewhere. The test stay valid by giving just a bit more time to Jenkins server. TO TEST: - Confirm that the two test hasn't changed. They the just get 4s to perform - Push the patch to master and observe that DateUtils.t doesn't fail anymore. NOTE: Also passed koha qa test tools too. Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
You are removing the usefulness of this test :) This test should not take more than 1s, do you know if it's new?
A workaround would be to get the loadavg of the server at the moment the tests run. If it's > x and the test fails, then skip it.
(In reply to Jonathan Druart from comment #3) > You are removing the usefulness of this test :) I don't. When this test is supposed to 'normally' fail it take minutes to calculate duration in the far futur (9999). So, changing the 'normal' duration from 1s to 4s doesn't change the ability of this test to detect the fix introduced by bug 13342 to the way Koha::DateUtils calculate 9999- dates. > This test should not take more than 1s, do you know if it's new? No. It seems to occur randomly.
Tomas, do you know if the nodes are monitored? It would be good to know if the server is overloaded when the test fails.
(In reply to Jonathan Druart from comment #6) > Tomas, do you know if the nodes are monitored? > It would be good to know if the server is overloaded when the test fails. I'll try to gather some information.
Created attachment 48777 [details] [review] Bug 15445 DateUtils.t fails on Jenkins due to server sluggishness Jenkins server is abnormally slow to perform a task done in less than 1s elsewhere. The test stay valid by giving just a bit more time to Jenkins server. TO TEST: - Confirm that the two test hasn't changed. They the just get 4s to perform - Push the patch to master and observe that DateUtils.t doesn't fail anymore. NOTE: Also passed koha qa test tools too. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Amended: Changed to 2s, should be enough
Frédéric, I have amended your patch and set the delay to 2sec. It should be ok for jenkins. Hope it's fine for you!
Pushed to Master - Should be in the May 2016 Release. Thanks
Patch pushed to 3.22.x, will be in 3.22.5