Skip to content

Commit e6e62f3

Browse files
committed
Merge pull request #484 from badboy/travis-test
Use pure ruby to send a TCP message
2 parents 5b7fbe1 + d97779c commit e6e62f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/publish_subscribe_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def test_unsubscribe_without_a_subscribe
191191
def test_subscribe_past_a_timeout
192192
# For some reason, a thread here doesn't reproduce the issue.
193193
sleep = %{sleep #{OPTIONS[:timeout] * 2}}
194-
publish = %{echo "publish foo bar\r\n" | nc 127.0.0.1 #{OPTIONS[:port]}}
194+
publish = %{ruby -rsocket -e 't=TCPSocket.new("127.0.0.1",#{OPTIONS[:port]});t.write("publish foo bar\\r\\n");t.read(4);t.close'}
195195
cmd = [sleep, publish].join("; ")
196196

197197
IO.popen(cmd, "r+") do |pipe|

0 commit comments

Comments
 (0)