From 4d26b806ddb077886294d1488b94bead609b2d56 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Fri, 16 Jul 2021 11:38:06 +0100 Subject: [PATCH] delay - add test for push toFront and flush=1 --- test/nodes/core/function/89-delay_spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/nodes/core/function/89-delay_spec.js b/test/nodes/core/function/89-delay_spec.js index 4c1ac9dbc..4620458f8 100644 --- a/test/nodes/core/function/89-delay_spec.js +++ b/test/nodes/core/function/89-delay_spec.js @@ -824,7 +824,7 @@ describe('delay Node', function() { } else if (msg.topic === "doo") { msg.payload.should.equal(1); - (Date.now() - t).should.be.approximately(404,50); + (Date.now() - t).should.be.approximately(4,50); c = c + 1; } if (c === 5) { done(); } @@ -837,7 +837,7 @@ describe('delay Node', function() { delayNode1.receive({payload:1,topic:"aoo"}); setImmediate( function() { delayNode1.receive({payload:1,topic:"boo"}); } ); setImmediate( function() { delayNode1.receive({payload:1,topic:"coo",toFront:true}); } ); - setImmediate( function() { delayNode1.receive({payload:1,topic:"doo"}); } ); + setImmediate( function() { delayNode1.receive({payload:1,topic:"doo",toFront:true,flush:1}); } ); setImmediate( function() { delayNode1.receive({payload:1,topic:"eoo",toFront:true}); } ); setImmediate( function() { delayNode1.receive({flush:1}); }); setTimeout( function() { delayNode1.receive({flush:1}); }, 200);