fix(locking): Fix flaky test + Remove sentry excluded exception #2365
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cette PR fait suite à #2340 et je modifie deux choses par rapport au commit initial:
Je change la spec du concern
locked_jobs
qui était flaky parce que le lock pouvait persister entre les 2 tests que comprend le fichierlocked_jobs_spec.rb
. Je fais en sorte d'englober chaque thread dans un bloc que l'on passe àActiveRecord::Base.connection_pool.with_connection
pour être sûr que le thread release sa connection (et donc le lock) après son exécution. Ce changement se trouve ici: 7aca12aSuite à ce commentaire feat(app): Keep resources synched with rdvsp #2340 (comment) je remets l'exception sur sentry le temps de voir si on a bien des jobs qui raise en tentant d'acquérir le lock. Ce changement se trouve ici: 97ee7c8