summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-11 19:07:49 +0000
committerseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-11 19:07:49 +0000
commit135bb5717402d978052ae4e674e2e38494febf7a (patch)
tree6232523c184a5c384e357f43883bbd120f2f5c35 /test
parent3a0e807df3ecc9260bf39f687e33394306679a79 (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/rinda/test_rinda.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/rinda/test_rinda.rb b/test/rinda/test_rinda.rb
index d663e04..553d307 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])