summaryrefslogtreecommitdiff
path: root/test/pummel/test-net-pingpong.js
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-07-15 11:47:25 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-07-15 14:21:31 -0700
commit9fd5e3c89cb3664be7491c2da8e7060a0c36e135 (patch)
treed748de58c1638e852d33374c328a45f6ab8d2268 /test/pummel/test-net-pingpong.js
parent94728125696ce05f5308ccbc111874e9fa936936 (diff)
downloadandroid-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-pingpong.js')
-rw-r--r--test/pummel/test-net-pingpong.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/pummel/test-net-pingpong.js b/test/pummel/test-net-pingpong.js
index a57234a530..59bf3b4cec 100644
--- a/test/pummel/test-net-pingpong.js
+++ b/test/pummel/test-net-pingpong.js
@@ -1,4 +1,5 @@
-require("../common");
+common = require("../common");
+assert = common.assert
net = require("net");
var tests_run = 0;
@@ -84,12 +85,12 @@ function pingPongTest (port, host, on_complete) {
}
/* All are run at once, so run on different ports */
-pingPongTest(PORT, "localhost");
-pingPongTest(PORT+1, null);
+pingPongTest(common.PORT, "localhost");
+pingPongTest(common.PORT+1, null);
// This IPv6 isn't working on Solaris
var solaris = /sunos/i.test(process.platform);
-if (!solaris) pingPongTest(PORT+2, "::1");
+if (!solaris) pingPongTest(common.PORT+2, "::1");
process.addListener("exit", function () {
assert.equal(solaris ? 2 : 3, tests_run);