Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/couchbase
6 changes: 6 additions & 0 deletions test/active_support/cache_store_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ def setup
})
end

def teardown
# TODO(DC): We might need to add a way to do this on the CouchbaseStore API
cluster = @cache.instance_variable_get(:@cluster)
cluster&.disconnect
end

def test_clear
skip("#{name}: The #{Couchbase::Protostellar::NAME} protocol does not support consistent_with yet") if env.protostellar?
skip("#{name}: CAVES does not support query service yet for clear in cache adapter") if use_caves?
Expand Down
15 changes: 15 additions & 0 deletions test/active_support/caching_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@ def setup

@cache = lookup_store(expires_in: 300.seconds)
end

def teardown
disconnect_store(@cache)
disconnect_store(@peek) if defined?(@peek)
end

private

# TODO(DC): We might need to add a way to do this on the CouchbaseStore API
def disconnect_store(store)
return unless store

cluster = store.instance_variable_get(:@cluster)
cluster&.disconnect
end
end

class HealthyStoreTest < CachingTest
Expand Down
Loading