Browse Source

Remove a few wait() calls in the tests

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
c2e58c9dee
  1. 2
      test/mjsunit/test-fs-write.js
  2. 6
      test/mjsunit/test-http-tls.js
  3. 6
      test/mjsunit/test-tcp-tls.js

2
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);
});
});
});

6
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) {

6
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);

Loading…
Cancel
Save