зеркало из https://github.com/github/memcached.git
Better error in stats.
This commit is contained in:
Родитель
d34a40f0e0
Коммит
f80edb6321
|
@ -409,6 +409,10 @@ Please note that when pipelining is enabled, setter and deleter methods do not r
|
|||
|
||||
Lib.memcached_stat_free(@struct, stat_struct)
|
||||
stats
|
||||
rescue Memcached::SomeErrorsWereReported => _
|
||||
e = _.class.new("Error getting stats")
|
||||
e.set_backtrace(_.backtrace)
|
||||
raise e
|
||||
end
|
||||
|
||||
### Operations helpers
|
||||
|
|
|
@ -746,6 +746,11 @@ class MemcachedTest < Test::Unit::TestCase
|
|||
assert_instance_of String, stats[:version].first
|
||||
end
|
||||
|
||||
def test_missing_stats
|
||||
cache = Memcached.new('localhost:43041')
|
||||
assert_raises(Memcached::SomeErrorsWereReported) { cache.stats }
|
||||
end
|
||||
|
||||
# Clone
|
||||
|
||||
def test_clone
|
||||
|
|
Загрузка…
Ссылка в новой задаче