Skip to content

Commit e3279a0

Browse files
committed
fix: lease_connection -> connection
1 parent 9854845 commit e3279a0

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

test/cases/primary_keys_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class Rocket < ActiveRecord::Base
103103
end
104104

105105
def setup
106-
connection = ActiveRecord::Base.lease_connection
106+
connection = ActiveRecord::Base.connection
107107
connection.execute <<-SQL
108108
CREATE TABLE rockets(
109109
id SERIAL PRIMARY KEY USING HASH WITH (bucket_count=4)

test/cases/schema_dumper_test.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ class SchemaDumperTest < ActiveRecord::TestCase
1010
include SchemaDumpingHelper
1111
self.use_transactional_tests = false
1212

13-
setup do
14-
@schema_migration = ActiveRecord::Base.connection_pool.schema_migration
15-
@schema_migration.create_table
16-
end
17-
1813
# See https://github.com/cockroachdb/activerecord-cockroachdb-adapter/issues/347
1914
def test_dump_index_rather_than_unique_constraints
2015
ActiveRecord::Base.with_connection do |conn|
@@ -207,7 +202,7 @@ def down
207202
$stdout = original
208203
end
209204

210-
if ActiveRecord::Base.lease_connection.supports_check_constraints?
205+
if ActiveRecord::Base.connection.supports_check_constraints?
211206
def test_schema_dumps_check_constraints
212207
constraint_definition = dump_table_schema("products").split(/\n/).grep(/t.check_constraint.*products_price_check/).first.strip
213208
if current_adapter?(:Mysql2Adapter)

0 commit comments

Comments
 (0)