summaryrefslogtreecommitdiff
path: root/test/rexml/test_sax.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-20 21:25:49 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-20 21:25:49 +0000
commit182b6148692f94263dd2adc575b9398c8da0306a (patch)
treee3716bd849603d46ef2f46470b4cbc5c7c9a8c4f /test/rexml/test_sax.rb
parentf4db8aedc87d0ff901206e4c59478554b7b952a6 (diff)
* test/rexml/test_contrib.rb (ContribTester#test_pos): should not
use fixed path name for tests. [ruby-dev:42827] * test/rexml/test_sax.rb (SAX2Tester#test_socket): should not use fixed port for tests. [ruby-dev:42828] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rexml/test_sax.rb')
-rw-r--r--test/rexml/test_sax.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/rexml/test_sax.rb b/test/rexml/test_sax.rb
index c5ac21ca3d..569270ceb1 100644
--- a/test/rexml/test_sax.rb
+++ b/test/rexml/test_sax.rb
@@ -221,10 +221,8 @@ class SAX2Tester < Test::Unit::TestCase
def test_socket
require 'socket'
- port = 12345
-
- server = TCPServer.new('127.0.0.1', port)
- socket = TCPSocket.new('127.0.0.1', port)
+ server = TCPServer.new('127.0.0.1', 0)
+ socket = TCPSocket.new('127.0.0.1', server.addr[1])
ok = false
session = server.accept