cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject [23/50] [abbrv] git commit: updated refs/heads/rbac to 9e92197
Date Tue, 04 Feb 2014 23:39:07 GMT
Fix mock socket client/server test.

Normally a server will bind to 0.0.0.0, which is not an
address that a client can specify to connect to.
127.0.0.1 or ::1 will do.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b32b49e8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b32b49e8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b32b49e8

Branch: refs/heads/rbac
Commit: b32b49e853b2742ec8b32e64eecc083a621fd835
Parents: 5de9ae0
Author: Hiroaki KAWAI <kawai@stratosphere.co.jp>
Authored: Thu Jan 30 20:14:55 2014 +0900
Committer: U-kawai-x230\kawai <kawai@kawai-x230.(none)>
Committed: Thu Jan 30 21:11:56 2014 +0900

----------------------------------------------------------------------
 .../rdpconsole/src/test/java/rdpclient/MockServerTest.java       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b32b49e8/services/console-proxy-rdp/rdpconsole/src/test/java/rdpclient/MockServerTest.java
----------------------------------------------------------------------
diff --git a/services/console-proxy-rdp/rdpconsole/src/test/java/rdpclient/MockServerTest.java
b/services/console-proxy-rdp/rdpconsole/src/test/java/rdpclient/MockServerTest.java
index a40cdb8..17bc4bd 100755
--- a/services/console-proxy-rdp/rdpconsole/src/test/java/rdpclient/MockServerTest.java
+++ b/services/console-proxy-rdp/rdpconsole/src/test/java/rdpclient/MockServerTest.java
@@ -58,7 +58,7 @@ public class MockServerTest extends TestCase {
 
         Socket socket = SocketFactory.getDefault().createSocket();
         try {
-            socket.connect(server.getAddress());
+            socket.connect(new InetSocketAddress("127.0.0.1", server.getAddress().getPort()));
 
             InputStream is = socket.getInputStream();
             OutputStream os = socket.getOutputStream();
@@ -127,7 +127,7 @@ public class MockServerTest extends TestCase {
 
         Socket socket = SocketFactory.getDefault().createSocket();
         try {
-            InetSocketAddress address = server.getAddress();
+            InetSocketAddress address = new InetSocketAddress("127.0.0.1", server.getAddress().getPort());
             socket.connect(address);
 
             // Send hello data over plain connection


Mime
View raw message