Skip to content

Commit

Permalink
move node server in test package, make acknowledge test working again.
Browse files Browse the repository at this point in the history
  • Loading branch information
tox committed Feb 20, 2012
1 parent c9455dc commit 9dbb23c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/io/socket/TestSocketIO.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

@RunWith(io.socket.RandomBlockJUnit4ClassRunner.class)
public class TestSocketIO implements IOCallback {
private final static String NODE = "/opt/local/bin/node";
private final static String NODE = "C:\\Program Files (x86)\\nodejs\\node.exe";
private static final int PORT = 10214;
private static final int TIMEOUT = 200;
private static final int TIMEOUT = 2;
LinkedBlockingQueue<String> events;
LinkedBlockingQueue<String> outputs;
LinkedBlockingQueue<Object> args;
Expand Down Expand Up @@ -205,7 +205,6 @@ public void namespaces() throws Exception {
assertEquals("ns2", takeArg());

ns2_2.disconnect();

ns2.disconnect();
assertEquals("onDisconnect", takeEvent());
assertEquals("onDisconnect", takeEvent());
Expand All @@ -215,7 +214,7 @@ public void namespaces() throws Exception {
@Test
public void error() throws Exception {
doConnect();
SocketIO error = new SocketIO(
new SocketIO(
"http://127.0.0.1:" + (PORT + 1) + "/ns1", this);
assertEquals("onError", takeEvent());
doClose();
Expand Down
3 changes: 3 additions & 0 deletions node/socketio.js → tests/io/socket/socketio.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ var main = io.sockets.on('connection', function(socket) {
socket.send(data);
}
});
socket.on('echoAck', function(data, ack) {
ack(data);
});
socket.on('message', function(m) {
process.stdout.write("__:MESSAGE:"+m+"\n");
});
Expand Down

0 comments on commit 9dbb23c

Please sign in to comment.