summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-22 03:39:26 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-22 03:39:26 +0000
commite66f118a9bf4e727ed63003af56a028779429482 (patch)
tree0f7aabb840ecbe53cedd4be521bc76870715b536 /test
parent679e43eccb1f458deac7f8be824e17c98e79bead (diff)
* lib/rinda/tuplespace.rb: fix Rinda::TupleSpace keeper thread bug.
the thread is started too early. [ruby-talk:264062] * test/rinda/test_rinda.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13222 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 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])