From f188b9d6d77d51e8023853d4828b07b0cac3f24e Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 30 Aug 2010 14:15:28 -0700 Subject: [PATCH] Remove timer from test/simple/test-dgram-unix.js Test running already has a timeout mechanism. --- test/simple/test-dgram-unix.js | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/test/simple/test-dgram-unix.js b/test/simple/test-dgram-unix.js index ddb608490c..0daefd048a 100644 --- a/test/simple/test-dgram-unix.js +++ b/test/simple/test-dgram-unix.js @@ -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) { @@ -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);