Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

Fixes #1583.
  • Loading branch information...
commit 38d7ef1407d2859138556816ab1a9d5115ee52c0 1 parent 64b4168
@koichik authored
Showing with 10 additions and 18 deletions.
  1. +10 −18 test/simple/test-tls-client-abort.js
View
28 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;
- });
-})();
+});
Please sign in to comment.
Something went wrong with that request. Please try again.