-
- Downloads
Disable Sidekiq worker open transaction check in JS specs
When transactional tests are enabled, Rails ensures that all threads use the same connection for accessing the database. However this may cause a false positive with the Sidekiq worker open transaction check because: 1. A browser may have multiple requests in-flight. 2. A transaction may start in the middle of another request. For example, an update to a merge request column initiates a transaction via SAVEPOINT. To avoid false positives, disable this check for JavaScript feature specs run. The alternative is to use the deletion strategy, but that would significantly slow tests. Relates to #478601
parent
6a195d48
No related branches found
No related tags found
Showing
- config/initializers/forbid_sidekiq_in_transactions.rb 10 additions, 0 deletionsconfig/initializers/forbid_sidekiq_in_transactions.rb
- spec/initializers/forbid_sidekiq_in_transactions_spec.rb 16 additions, 2 deletionsspec/initializers/forbid_sidekiq_in_transactions_spec.rb
- spec/support/capybara.rb 15 additions, 0 deletionsspec/support/capybara.rb
Please register or sign in to comment