fix(AMQP Trigger Node): Update rhea library, tweak reconnection options (#18980)

This commit is contained in:
Elias Meire
2025-09-05 18:34:29 +02:00
committed by GitHub
parent 0ba924bda5
commit efc3a2d664
10 changed files with 406 additions and 40 deletions

View File

@@ -108,13 +108,15 @@ describe('ScheduleTrigger', () => {
});
it('should emit when manually executed', async () => {
const { emit } = await testTriggerNode(ScheduleTrigger, {
const { emit, manualTriggerFunction } = await testTriggerNode(ScheduleTrigger, {
mode: 'manual',
timezone,
node: { parameters: { rule: { interval: [{ field: 'hours', hoursInterval: 3 }] } } },
workflowStaticData: { recurrenceRules: [] },
});
await manualTriggerFunction?.();
expect(emit).toHaveBeenCalledTimes(1);
const firstTriggerData = emit.mock.calls[0][0][0][0];
@@ -134,25 +136,26 @@ describe('ScheduleTrigger', () => {
});
it('should throw on invalid cron expressions in manual mode', async () => {
await expect(
testTriggerNode(ScheduleTrigger, {
mode: 'manual',
timezone,
node: {
parameters: {
rule: {
interval: [
{
field: 'cronExpression',
expression: '@daily *', // adding extra fields to shorthand not allowed -> invalid
},
],
},
const { manualTriggerFunction } = await testTriggerNode(ScheduleTrigger, {
mode: 'manual',
timezone,
node: {
parameters: {
rule: {
interval: [
{
field: 'cronExpression',
expression: '@daily *', // adding extra fields to shorthand not allowed -> invalid
},
],
},
},
workflowStaticData: {},
}),
).rejects.toBeInstanceOf(n8nWorkflow.NodeOperationError);
},
workflowStaticData: {},
});
await expect(manualTriggerFunction?.()).rejects.toBeInstanceOf(
n8nWorkflow.NodeOperationError,
);
});
});
});