Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

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

Fixes #1583.
  • Loading branch information...
koichik committed Aug 25, 2011
1 parent 6ab4a4c commit 43cdbec3be496cf542dee8818746ec896a756129
Showing with 10 additions and 18 deletions.
  1. +10 −18 test/simple/test-tls-client-abort.js
@@ -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 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 cert = fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'));
var key = fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem'));

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

0 comments on commit 43cdbec

Please sign in to comment.
You can’t perform that action at this time.