Skip to content

Commit

Permalink
Remove timer from test/simple/test-dgram-unix.js
Browse files Browse the repository at this point in the history
Test running already has a timeout mechanism.
  • Loading branch information
ry committed Sep 9, 2010
1 parent 14f16ec commit 294c455
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions test/simple/test-dgram-unix.js
Expand Up @@ -6,8 +6,7 @@ var Buffer = require("buffer").Buffer,
dgram = require("dgram"), server, client,
server_path = "/tmp/dgram_server_sock",
client_path = "/tmp/dgram_client_sock",
message_to_send = new Buffer("A message to send"),
timer;
message_to_send = new Buffer("A message to send");

server = dgram.createSocket("unix_dgram");
server.on("message", function (msg, rinfo) {
Expand Down Expand Up @@ -37,20 +36,8 @@ server.on("listening", function () {
assert.strictEqual(bytes, message_to_send.length);
});
});
client.on("close", function () {
if (server.fd === null) {
clearTimeout(timer);
}
});

client.bind(client_path);
});
server.on("close", function () {
if (client.fd === null) {
clearTimeout(timer);
}
});
server.bind(server_path);

timer = setTimeout(function () {
throw new Error("Timeout");
}, 200);
server.bind(server_path);

0 comments on commit 294c455

Please sign in to comment.