Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions test/parallel/test-dgram-send-callback-multi-buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@ const dgram = require('dgram');

const client = dgram.createSocket('udp4');

const timer = setTimeout(function() {
throw new Error('Timeout');
}, common.platformTimeout(200));

const messageSent = common.mustCall(function messageSent(err, bytes) {
assert.equal(bytes, buf1.length + buf2.length);
clearTimeout(timer);
});

const buf1 = Buffer.alloc(256, 'x');
Expand Down
5 changes: 0 additions & 5 deletions test/parallel/test-dgram-send-multi-buffer-copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@ const dgram = require('dgram');

const client = dgram.createSocket('udp4');

const timer = setTimeout(function() {
throw new Error('Timeout');
}, common.platformTimeout(200));

const onMessage = common.mustCall(function(err, bytes) {
assert.equal(bytes, buf1.length + buf2.length);
clearTimeout(timer);
});

const buf1 = Buffer.alloc(256, 'x');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,19 @@ const assert = require('assert');

const bonkers = Buffer.alloc(1024, 42);

let tlsClientErrorEmited = false;

const server = tls.createServer({})
.listen(0, function() {
const c = net.connect({ port: this.address().port }, function() {
c.write(bonkers);
});

}).on('tlsClientError', function(e) {
tlsClientErrorEmited = true;
}).on('tlsClientError', common.mustCall(function(e) {
assert.ok(e instanceof Error,
'Instance of Error should be passed to error handler');
assert.ok(e.message.match(
/SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol/),
'Expecting SSL unknown protocol');
});

setTimeout(function() {
server.close();

assert.ok(tlsClientErrorEmited,
'tlsClientError should be emited');

}, common.platformTimeout(200));
server.close();
}));