From c2e58c9dee39accb16d2edd12a1f35394b967d4c Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 17 Feb 2010 21:28:31 -0800 Subject: [PATCH] Remove a few wait() calls in the tests --- test/mjsunit/test-fs-write.js | 2 +- test/mjsunit/test-http-tls.js | 6 +++--- test/mjsunit/test-tcp-tls.js | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/mjsunit/test-fs-write.js b/test/mjsunit/test-fs-write.js index 198c932b0d..0211a82b3c 100644 --- a/test/mjsunit/test-fs-write.js +++ b/test/mjsunit/test-fs-write.js @@ -9,7 +9,7 @@ fs.open(fn, 'w', 0644).addCallback(function (file) { fs.close(file).addCallback(function() { fs.readFile(fn, process.UTF8).addCallback(function(contents) { found = contents; - fs.unlink(fn).wait(); + fs.unlinkSync(fn); }); }); }); diff --git a/test/mjsunit/test-http-tls.js b/test/mjsunit/test-http-tls.js index 2e5e4e84e1..da4ae18543 100644 --- a/test/mjsunit/test-http-tls.js +++ b/test/mjsunit/test-http-tls.js @@ -21,9 +21,9 @@ var responses_sent = 0; var responses_recvd = 0; var body0 = ""; var body1 = ""; -var caPem = fs.readFile(fixturesDir+"/test_ca.pem").wait(); -var certPem = fs.readFile(fixturesDir+"/test_cert.pem").wait(); -var keyPem = fs.readFile(fixturesDir+"/test_key.pem").wait(); +var caPem = fs.readFileSync(fixturesDir+"/test_ca.pem"); +var certPem = fs.readFileSync(fixturesDir+"/test_cert.pem"); +var keyPem = fs.readFileSync(fixturesDir+"/test_key.pem"); var http_server=http.createServer(function (req, res) { diff --git a/test/mjsunit/test-tcp-tls.js b/test/mjsunit/test-tcp-tls.js index 80f85d33b0..060ca3349b 100644 --- a/test/mjsunit/test-tcp-tls.js +++ b/test/mjsunit/test-tcp-tls.js @@ -105,9 +105,9 @@ try { } if (have_tls) { - var caPem = fs.readFile(fixturesDir+"/test_ca.pem").wait(); - var certPem = fs.readFile(fixturesDir+"/test_cert.pem").wait(); - var keyPem = fs.readFile(fixturesDir+"/test_key.pem").wait(); + var caPem = fs.readFileSync(fixturesDir+"/test_ca.pem"); + var certPem = fs.readFileSync(fixturesDir+"/test_cert.pem"); + var keyPem = fs.readFileSync(fixturesDir+"/test_key.pem"); /* All are run at once, so run on different ports */ tlsTest(20443, "localhost", caPem, keyPem, certPem);