Read more

Mysql::Error: SAVEPOINT active_record_1 does not exist: ROLLBACK TO SAVEPOINT active_record_1 (ActiveRecord::StatementInvalid)

Henning Koch
February 06, 2012Software engineer at makandra GmbH

Possible Reason 1: parallel_tests - running more processes than features

If you run old versions of parallel_tests Show archive.org snapshot with more processes than you have Cucumber features, you will get errors like this in unexpected places:

Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

This is a bug caused by multiple processes running the same features on the same database.

The bug is fixed in versions 0.6.18+ Show archive.org snapshot .

Possible Reason 2: You are running parallel tests but you are using an (probably old) database.yml which is not setup for parallel tests.

Checkout the card below to see how to set it up properly:

How to run your tests in parallel to speed up test execution

Possible Reason 3: (Tests) You are using database_cleaner with the :transaction strategy, while use_transactional_fixtures is true

Turn transactional fixtures off -- database_cleaner will take care of this. See How to set up database_cleaner for Rails with Cucumber and RSpec.

Posted by Henning Koch to makandra dev (2012-02-06 19:31)