mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test/socket/test_unix.rb: replace sleep with select
Not sure what drugs I was on, but blindly sleeping instead of using IO#wait or IO.select to wait for data on a socket is completely wrong. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
58ba24f885
commit
072b3c8624
2 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Jun 18 18:24:12 2015 Eric Wong <e@80x24.org>
|
||||
|
||||
* test/socket/test_unix.rb: replace sleep with select
|
||||
|
||||
Thu Jun 18 17:59:06 2015 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* vm.c (rb_vm_control_frame_id_and_class): remove usless codes.
|
||||
|
|
|
@ -388,7 +388,7 @@ class TestSocket_UNIXSocket < Test::Unit::TestCase
|
|||
|
||||
buf = ""
|
||||
s2.send("BBBBBB", 0)
|
||||
sleep 0.1
|
||||
IO.select([s1])
|
||||
rv = s1.recv(100, 0, buf)
|
||||
assert_equal buf.object_id, rv.object_id
|
||||
assert_equal "BBBBBB", rv
|
||||
|
|
Loading…
Add table
Reference in a new issue