зеркало из https://github.com/github/memcached.git
free method that doesnt work
This commit is contained in:
Родитель
f97c1e2433
Коммит
3f08a94202
|
@ -1,12 +1,16 @@
|
|||
|
||||
if `which swig` !~ /no swig/
|
||||
require 'mkmf'
|
||||
|
||||
if ENV['SWIG']
|
||||
puts "running SWIG"
|
||||
$stdout.write `swig -I/opt/local/include -ruby -autorename libmemcached.i`
|
||||
end
|
||||
|
||||
require 'mkmf'
|
||||
# $CFLAGS << " -ggdb -DHAVE_DEBUG"
|
||||
# find_header 'libmemcached/memcached.h'
|
||||
if ENV['DEBUG']
|
||||
puts "setting debug flags"
|
||||
$CFLAGS << " -ggdb -DHAVE_DEBUG"
|
||||
end
|
||||
|
||||
dir_config 'libmemcached'
|
||||
find_library 'memcached', 'memcached_server_add'
|
||||
create_makefile 'libmemcached'
|
||||
|
|
|
@ -97,5 +97,15 @@ class Memcached
|
|||
return true if int == 0
|
||||
raise @@exceptions[int]
|
||||
end
|
||||
|
||||
# def free
|
||||
# Libmemcached.memcached_free(@struct)
|
||||
# class << self
|
||||
# (self.instance_methods - Object.instance_methods).each do |method|
|
||||
# remove_method :method
|
||||
# end
|
||||
# end
|
||||
# @struct = nil
|
||||
# end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
|
||||
# Start memcached
|
||||
|
||||
HERE = File.dirname(__FILE__)
|
||||
|
||||
`ps awx`.split("\n").grep(/4304[1-3]/).map do |process|
|
||||
system("kill -9 #{process.to_i}")
|
||||
end
|
||||
|
||||
system "memcached -p 43042 &"
|
||||
system "memcached -p 43043 &"
|
||||
log = "#{HERE}/log/memcached.log"
|
||||
system "touch #{log}"
|
||||
|
||||
system "memcached -vv -p 43042 >> #{log} 2>&1 &"
|
||||
system "memcached -vv -p 43043 >> #{log} 2>&1 &"
|
||||
|
|
|
@ -13,6 +13,10 @@ class ClassTest < Test::Unit::TestCase
|
|||
@value = OpenStruct.new(:a => 1, :b => 2, :c => GenericClass)
|
||||
@marshalled_value = Marshal.dump(@value)
|
||||
end
|
||||
|
||||
# def teardown
|
||||
# @cache.send(:free)
|
||||
# end
|
||||
|
||||
def test_initialize
|
||||
cache = Memcached.new ['127.0.0.1:43042', '127.0.0.1:43043'], :namespace => 'test'
|
||||
|
@ -189,6 +193,13 @@ class ClassTest < Test::Unit::TestCase
|
|||
|
||||
def test_stats
|
||||
end
|
||||
|
||||
# def test_freed_struct_cannot_be_used
|
||||
# @cache.send(:free)
|
||||
# assert_raise(NoMethodError) do
|
||||
# @cache.get 'test_freed_struct_cannot_be_used'
|
||||
# end
|
||||
# end
|
||||
|
||||
def test_thread_contention
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче