From 135bb5717402d978052ae4e674e2e38494febf7a Mon Sep 17 00:00:00 2001 From: seki Date: Sat, 11 Aug 2007 19:07:49 +0000 Subject: fix Rinda::TupleSpace keeper thread bug. the thread is started too early. [ruby-talk:264062] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rinda/test_rinda.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test') diff --git a/test/rinda/test_rinda.rb b/test/rinda/test_rinda.rb index d663e0446d..553d3078fe 100644 --- a/test/rinda/test_rinda.rb +++ b/test/rinda/test_rinda.rb @@ -240,6 +240,20 @@ module TupleSpaceTestModule end end + def test_ruby_talk_264062 + th = Thread.new { @ts.take([:empty], 1) } + sleep 2 + assert_raises(Rinda::RequestExpiredError) do + th.value + end + + th = Thread.new { @ts.read([:empty], 1) } + sleep 2 + assert_raises(Rinda::RequestExpiredError) do + th.value + end + end + def test_core_01 5.times do |n| @ts.write([:req, 2]) -- cgit v1.2.3