Tryton - Issues

 

Issue6844

Title Tests are failed sometimes because PG is not accepting connection yet
Priority bug Status resolved
Superseder Nosy List ced, reviewbot, roundup-bot
Type behavior Components trytond
Assigned To ced Keywords review
Reviews 43671002
View: 43671002

Created on 2017-10-12.09:26:59 by ced, last changed by roundup-bot.

Messages
New changeset 8394b90487f0 by C├ędric Krier in branch 'default':
Wait for the database accepting connection to run tests
http://hg.tryton.org/trytond/rev/8394b90487f0
review43671002 updated at https://codereview.tryton.org/43671002/#ps1
msg36617 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-10-29.22:12:33
I re-open it because even with 3 workers we still have some errors. As far as I see it happens between 2-3h which is when the daily cron jobs are running.
So I propose to catch database connection error in test suite run when testing if the database exist and retry until the connection works. This is implemented in review43671002
msg36551 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-10-24.22:00:26
There was still some issue with 4 agents on heavy load. I tried with 3 agents and it seems to handle the load.
msg36358 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-10-18.14:57:48
It tooks 9 seconds before trying to connect to the database.
I think instead of adding a sleep for random number, we should calibrate better the number of agents that runs on the testing server.
I decrease the number to 4 now to not overload the server, let's see how it works. If we want faster tests, the Foundation should provide more machines.
msg36252 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-10-12.09:27:22
Example of such failure: https://drone.tryton.org/tryton/trytond/37/13
msg36251 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-10-12.09:26:58
I think we should add the trick of http://docs.drone.io/services/#initialization
15 seconds seems long, I propose to put 5 seconds.
History
Date User Action Args
2017-10-30 09:36:59roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg36619
2017-10-29 22:19:37reviewbotsetnosy: + reviewbot
messages: + msg36618
2017-10-29 22:12:33cedsetstatus: closed -> testing
reviews: 43671002
component: + trytond
messages: + msg36617
keyword: + review
2017-10-24 22:00:26cedsetstatus: testing -> closed
messages: + msg36551
2017-10-18 14:57:48cedsetstatus: in-progress -> testing
messages: + msg36358
2017-10-12 09:27:22cedsetmessages: + msg36252
2017-10-12 09:26:59cedcreate

Showing 10 items. Show all history (warning: this could be VERY long)