From: Daeyeon Jeong Date: Mon, 18 Sep 2017 14:36:35 +0000 (+0900) Subject: fix iotjs net connection test X-Git-Tag: 1.1_Public_Release~186^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ba3eba8580bdd80635fab5b76a7f3f58254fee7a;p=rtos%2Ftinyara.git fix iotjs net connection test This gets the net_connection test fixed through moving the time when closing server. The test purpose is to test 'net.connect'. --- diff --git a/external/iotjs/test/run_pass/test_net_connect.js b/external/iotjs/test/run_pass/test_net_connect.js index d1e46e1..e129940 100644 --- a/external/iotjs/test/run_pass/test_net_connect.js +++ b/external/iotjs/test/run_pass/test_net_connect.js @@ -20,10 +20,7 @@ var port = 5696; var msg = 'Hello IoT.js'; var server = net.createServer({ - allowHalfOpen: true, - }, - function(socket) { - server.close(); + allowHalfOpen: true } ).listen(port); @@ -45,6 +42,7 @@ var socket = net.connect(port, host, function() { socket.on('end', function() { assert.equal(data, msg); + server.close(); }); socket.end(msg);