From 387fa3b0ea6cdcc041a1ba45f262033ac7aa214e Mon Sep 17 00:00:00 2001 From: Mostafa Samir Date: Fri, 1 Apr 2016 20:29:42 +0200 Subject: [PATCH] tweaked the test suite to accommodate to windows delays --- .../support/jasmineTest/TCP/tcpSocketClient.spec.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/spec/support/jasmineTest/TCP/tcpSocketClient.spec.js b/spec/support/jasmineTest/TCP/tcpSocketClient.spec.js index 97d36e8..57d10b3 100644 --- a/spec/support/jasmineTest/TCP/tcpSocketClient.spec.js +++ b/spec/support/jasmineTest/TCP/tcpSocketClient.spec.js @@ -2,9 +2,18 @@ 'use strict'; const ipc = require('../../../../node-ipc'); +const os = require('os').platform(); describe('TCP Socket verification of client', function TCPClientSpec(){ + + var windows_delay = 0; + + if(os === "win32") { + windows_delay = 4000; + jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000; + } + it( 'Verify retry attempts by TCP client to connect to the server as per the value set in "maxRetries" parameter.', function testIt(done){ @@ -41,7 +50,7 @@ describe('TCP Socket verification of client', done(); }, ipc.config.retry*ipc.config.maxRetries + - ipc.config.retry+ipc.config.retry + ipc.config.retry+ipc.config.retry + windows_delay ); } @@ -80,7 +89,7 @@ describe('TCP Socket verification of client', ipc.disconnect('tcpFakeServer'); done(); }, - ipc.config.retry*ipc.config.maxRetries + ipc.config.retry*ipc.config.maxRetries + windows_delay ); } );