Reputation: 4056
Anyone know how I can get around this sqlite lock error? I tried sleep but it's not helping.
ActiveRecord::StatementInvalid: ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction
The test
assert_selector(:css, '#visu', visible: :hidden)
click_button("show/hide")
sleep(20)
assert_selector(:css, '#visu')
I am using 'selenium-webdriver', '~> 2.53.4'
Upvotes: 0
Views: 115
Reputation: 49910
You need to configure database_cleaner and disable transactional testing, however the real answer here is to use a proper DB - Postgres or Mysql (You'll still need to configure database_cleaner - https://github.com/DatabaseCleaner/database_cleaner for your tests to work properly)
Additionally you should be able to use newer selenium-webdriver, you just also need to install geckodriver if using FF 48+, or specify marionette: false if using FF 47 as documented at the top of the Capybara README
Upvotes: 1