You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem only appears while running some tests. I've managed to reproduce the issue in a simple rspec test
require'rails_helper'RSpec.describe'Apartment Bug Data'doit'works'dopending("waiting for an official fix")Apartment::Tenant.create('test-schema')beginApartment::Tenant.create('test-schema')rescueApartment::TenantExists=>e# something happens here with the transaction in which the test should be executed that will cause the error belowendcreate(:model)# breaks here (on any attempt to save a model into DB)# ActiveRecord::StatementInvalid: PG::NoActiveSqlTransaction: ERROR: SAVEPOINT can only be used in transaction blocks# the console output says: WARNING: there is no transaction in progressendend
Expected behavior
The test should pass (aka the gem should not mess with the existing transaction).
Actual behavior
See the error above.
System configuration
rspec with config.use_transactional_fixtures = true
Database: (Tell us what database and its version you use.)
Steps to reproduce
The problem only appears while running some tests. I've managed to reproduce the issue in a simple rspec test
Expected behavior
The test should pass (aka the gem should not mess with the existing transaction).
Actual behavior
See the error above.
System configuration
rspec with
config.use_transactional_fixtures = true
Postgresql 12
the most recent version of
ros-apartment
gem:Apartment config (in
config/initializers/apartment.rb
or so):use_schemas
:true
Rails (or ActiveRecord) version:
7.0.3.1
3.2.0
The text was updated successfully, but these errors were encountered: