Class: TestProxyConnection
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- TestProxyConnection
show all
- Defined in:
- lib/ext/eventmachine-0.12.10/tests/test_proxy_connection.rb
Defined Under Namespace
Modules: Client, Client2, EarlyClosingProxy, ProxyConnection, ProxyServer, Server
Instance Method Summary
collapse
Instance Method Details
#test_early_close ⇒ Object
81
82
83
84
85
86
87
88
89
90
|
# File 'lib/ext/eventmachine-0.12.10/tests/test_proxy_connection.rb', line 81
def test_early_close
$client_data = nil
EM.run {
EM.start_server("127.0.0.1", 54321, Server)
EM.start_server("127.0.0.1", 12345, EarlyClosingProxy)
EM.connect("127.0.0.1", 12345, Client2)
}
assert($unbound_early)
end
|
#test_proxy_connection ⇒ Object
71
72
73
74
75
76
77
78
79
|
# File 'lib/ext/eventmachine-0.12.10/tests/test_proxy_connection.rb', line 71
def test_proxy_connection
EM.run {
EM.start_server("127.0.0.1", 54321, Server)
EM.start_server("127.0.0.1", 12345, ProxyServer)
EM.connect("127.0.0.1", 12345, Client)
}
assert_equal("I know!", $client_data)
end
|