test: simple/test-tls-client-abort fails on SunOS

Fixes #1583.
pull/5370/head
koichik 2011-08-26 01:01:08 +09:00
parent 6ab4a4c05c
commit 43cdbec3be
1 changed files with 9 additions and 17 deletions

View File

@ -30,23 +30,15 @@ var fs = require('fs');
var tls = require('tls');
var path = require('path');
(function() {
var cert = fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'));
var key = fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem'));
var cert = fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'));
var key = fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem'));
var errorEmitted = false;
process.on('exit', function() {
assert.ok(!errorEmitted);
});
var conn = tls.connect(common.PORT, {cert:cert, key:key}, function() {
assert.ok(false); // callback should never be executed
});
var conn = tls.connect(common.PORT, {cert:cert, key:key}, function() {
assert.ok(false); // callback should never be executed
});
conn.on('error', function() {
});
assert.doesNotThrow(function() {
conn.destroy();
conn.on('error', function() {
errorEmitted = true;
});
})();
});