Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
test: simple/test-tls-client-abort fails on SunOS
Fixes #1583.
  • Loading branch information
koichik committed Aug 26, 2011
1 parent 6ab4a4c commit 43cdbec
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions test/simple/test-tls-client-abort.js
Expand Up @@ -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.