OCA / account-financial-tools

Odoo Accountant Financial Tools and Utils
GNU Affero General Public License v3.0
309 stars 752 forks source link

[15.0][FIX]: account_move_name_sequence: tests: Listen to exceptions for each thread individually #1858

Closed Tardo closed 5 months ago

Tardo commented 5 months ago

Before this change, if one thread raises an exception, the other thread could continue working without waiting for it... which could cause problems with other tests.

OCA-git-bot commented 5 months ago

Hi @frahikLV, @alexis-via, @moylop260, some modules you are maintaining are being modified, check this out!

moylop260 commented 5 months ago

Hi @Tardo

Thank you for your fix

Can I ask for more details about reproducing the error, please?

Tardo commented 5 months ago

Hi @moylop260

I can reproduce it when testing: account_move_name_sequence, contract_payment_mode

contract_payment_mode fails with: psycopg2.errors.SerializationFailure: could not serialize access due to concurrent update

Tardo commented 5 months ago

@moylop260 One of the threads fails with: (could not obtain lock on row in relation "ir_sequence_date_range")

So, maybe server-ux/date_range is involved.

moylop260 commented 5 months ago

I can not reproduce it using the following command:

What command are you using to reproduce it?

Tardo commented 5 months ago

Something like: odoo-bin --test-enable --stop-after-init --workers=0 -i date_range,account_move_name_sequence,contract_payment_mode

I have many others OCA modules installed in the DB.

moylop260 commented 5 months ago

/ocabot merge patch

OCA-git-bot commented 5 months ago

On my way to merge this fine PR! Prepared branch 15.0-ocabot-merge-pr-1858-by-moylop260-bump-patch, awaiting test results.

OCA-git-bot commented 5 months ago

Congratulations, your PR was merged at 203f724bc6ae19511761d1e31835efe2cb1f6938. Thanks a lot for contributing to OCA. ❤️