diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-15 23:44:19 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-15 23:44:19 +0000 |
commit | d41b8ada12c6efac7430de966dffa396b79b2030 (patch) | |
tree | 18135eb279bd1b758759f03f81eb43786394b969 /test/rinda | |
parent | d0fba5f32c3aae53dfbb7a15eac6ba795a86f5da (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_5@13055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rinda')
-rw-r--r-- | test/rinda/test_rinda.rb | 14 |
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]) |