Revert "adding functionTimeout to settings"

This reverts commit a44f23c4e2.
This commit is contained in:
Kilian Hertel
2023-08-04 11:19:35 +02:00
parent 8069c9a524
commit 13c5d4debe
4 changed files with 1 additions and 38 deletions

View File

@@ -1426,33 +1426,6 @@ describe('function node', function() {
it('check if default function settings grab', function(done) {
RED.seetings.functionTimeout = 0.01;
var flow = [{id:"n1",type:"function",wires:[["n2"]],func:"while(1==1){};\nreturn msg;"}];
helper.load(functionNode, flow, function() {
var n1 = helper.getNode("n1");
n1.receive({payload:"foo",topic: "bar"});
setTimeout(function() {
try {
helper.log().called.should.be.true();
var logEvents = helper.log().args.filter(function(evt) {
return evt[0].type == "function";
});
logEvents.should.have.length(1);
var msg = logEvents[0][0];
msg.should.have.property('level', helper.log().ERROR);
msg.should.have.property('id', 'n1');
msg.should.have.property('type', 'function');
should.equal(msg.msg.message, 'Script execution timed out after 10ms');
delete RED.settings.functionExternalModules;
done();
} catch(err) {
done(err);
}
},50);
});
});
describe("finalize function", function() {
it('should execute', function(done) {