summaryrefslogtreecommitdiff
path: root/test/rinda
diff options
context:
space:
mode:
authorseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-28 15:41:14 +0000
committerseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-28 15:41:14 +0000
commit6fca4ecdd1576d61e12f99f24248f5160a1bff33 (patch)
treee8667e3edcb79688b8222420b7a83259e86ea28c /test/rinda
parent8687b8ffe8d3454b9a03b4b16916e1b555bf4f59 (diff)
improved keeper thread
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rinda')
-rw-r--r--test/rinda/test_rinda.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/rinda/test_rinda.rb b/test/rinda/test_rinda.rb
index d2b2c7f..7ac6918 100644
--- a/test/rinda/test_rinda.rb
+++ b/test/rinda/test_rinda.rb
@@ -6,6 +6,8 @@ require 'rinda/tuplespace'
require 'singleton'
+require 'weakref'
+
module Rinda
class MockClock
@@ -499,6 +501,14 @@ class TupleSpaceTest < Test::Unit::TestCase
ThreadGroup.new.add(Thread.current)
@ts = Rinda::TupleSpace.new(1)
end
+
+ def test_gc
+ w = WeakRef.new(Rinda::TupleSpace.new)
+ GC.start
+ assert_raises(WeakRef::RefError) do
+ w.__getobj__
+ end
+ end
end
class TupleSpaceProxyTest < Test::Unit::TestCase