diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2010-07-15 11:47:25 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-07-15 14:21:31 -0700 |
commit | 9fd5e3c89cb3664be7491c2da8e7060a0c36e135 (patch) | |
tree | d748de58c1638e852d33374c328a45f6ab8d2268 /test/pummel/test-net-timeout.js | |
parent | 94728125696ce05f5308ccbc111874e9fa936936 (diff) | |
download | android-node-v8-9fd5e3c89cb3664be7491c2da8e7060a0c36e135.tar.gz android-node-v8-9fd5e3c89cb3664be7491c2da8e7060a0c36e135.tar.bz2 android-node-v8-9fd5e3c89cb3664be7491c2da8e7060a0c36e135.zip |
Update tests to work with module contexts
Diffstat (limited to 'test/pummel/test-net-timeout.js')
-rw-r--r-- | test/pummel/test-net-timeout.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/pummel/test-net-timeout.js b/test/pummel/test-net-timeout.js index e1938abf6a..8bdf7b7c24 100644 --- a/test/pummel/test-net-timeout.js +++ b/test/pummel/test-net-timeout.js @@ -1,4 +1,5 @@ -require("../common"); +common = require("../common"); +assert = common.assert net = require("net"); exchanges = 0; starttime = null; @@ -29,11 +30,11 @@ var echo_server = net.createServer(function (socket) { }); }); -echo_server.listen(PORT, function () { - console.log("server listening at " + PORT); +echo_server.listen(common.PORT, function () { + console.log("server listening at " + common.PORT); }); -var client = net.createConnection(PORT); +var client = net.createConnection(common.PORT); client.setEncoding("UTF8"); client.setTimeout(0); // disable the timeout for client client.addListener("connect", function () { |