aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-18 09:25:37 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-18 09:25:37 +0000
commit072b3c862406a894e611175ecb48d1899c404228 (patch)
treee9d9b878cc90d2ed89930fbd89caf15ed4c2f7b5
parent58ba24f8858ed4e9cae3dfe5aa8e62e0c6316878 (diff)
downloadruby-072b3c862406a894e611175ecb48d1899c404228.tar.gz
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
-rw-r--r--ChangeLog4
-rw-r--r--test/socket/test_unix.rb2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 087b1e3442..3832e83361 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/test/socket/test_unix.rb b/test/socket/test_unix.rb
index 344dcc90ad..9ca97d2998 100644
--- a/test/socket/test_unix.rb
+++ b/test/socket/test_unix.rb
@@ -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