Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapters keep in_use flag when leased
- Loading branch information
1 parent
7837574
commit 9bf8bf8
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
activerecord/test/cases/connection_adapters/abstract_adapter_test.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,16 @@ | |||
require "cases/helper" | |||
|
|||
module ActiveRecord | |||
module ConnectionAdapters | |||
class AbstractAdapterTest < ActiveRecord::TestCase | |||
def test_in_use? | |||
adapter = AbstractAdapter.new nil, nil | |||
|
|||
# FIXME: change to refute in Rails 4.0 / mt | |||
assert !adapter.in_use?, 'adapter is not in use' | |||
assert adapter.lease, 'lease adapter' | |||
assert adapter.in_use?, 'adapter is in use' | |||
end | |||
end | |||
end | |||
end |