Skip to content

fix(core): Increase timeout for workflow execution tests#26150

Merged
shortstacked merged 2 commits intomasterfrom
shortstacked/flaky-retry-timeout
Feb 27, 2026
Merged

fix(core): Increase timeout for workflow execution tests#26150
shortstacked merged 2 commits intomasterfrom
shortstacked/flaky-retry-timeout

Conversation

@shortstacked
Copy link
Collaborator

Summary

  • Increases the Jest timeout for run test workflows tests from the default 5s to 15s
  • The retry_and_continue_on_error test executes ~46 Code node sandbox instances with retries, which intermittently exceeds the 5s default on slow CI runners

Root cause

The workflow test JSON exercises 31 nodes (15 Reset Count + 16 Retry/Continue Code nodes) with retryOnFail: true and waitBetweenTries: 10ms. Each Code node creates a JavaScriptSandbox VM context. The cumulative sandbox creation + execution time is ~3.5s locally (cold) and can exceed 5s on shared CI runners under load.

Test plan

  • Verified test passes locally with new timeout
  • Linting passes (biome pre-commit hook)

🤖 Generated with Claude Code

The retry_and_continue_on_error test executes ~46 Code node sandboxes
with retries, which can exceed the default 5s Jest timeout on slow CI
runners.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@shortstacked shortstacked requested review from a team and alexgrozav and removed request for a team February 23, 2026 20:27
@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Feb 23, 2026
@shortstacked shortstacked marked this pull request as ready for review February 24, 2026 09:11
The "creates new node project with custom template" test involves
filesystem operations and template scaffolding that can exceed the
default 5s timeout on slow CI runners.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Architecture diagram
sequenceDiagram
    participant Jest as Jest Runner
    participant Test as Workflow Test File
    participant Engine as WorkflowExecute (Core)
    participant Node as Code Node Execution
    participant Sandbox as JavaScriptSandbox (VM)

    Note over Jest,Sandbox: High-load Workflow Execution Test (retry_and_continue_on_error)

    Jest->>Test: CHANGED: Execute test block with 15s timeout (was 5s)
    Test->>Engine: execute(workflowJSON)
    
    loop For each Node in Workflow (31 total)
        Engine->>Node: run()
        
        Note over Node,Sandbox: Cumulative resource overhead
        
        Node->>Sandbox: NEW: Initialize VM context
        Node->>Sandbox: Execute JS code
        Sandbox-->>Node: Execution result
        
        alt Node fails AND retryOnFail is true
            Node->>Node: Wait (waitBetweenTries: 10ms)
            Node->>Sandbox: NEW: Re-initialize VM & re-run
            Sandbox-->>Node: Execution result
        end
        
        Node-->>Engine: nodeOutput
    end

    Note over Jest: Jest monitors elapsed time
    
    alt Total Time < 15s
        Engine-->>Test: executionResult
        Test-->>Jest: Test Passed
    else Total Time > 15s (Old behavior on slow CI)
        Jest->>Test: Terminate (Timeout Error)
    end
Loading

@shortstacked shortstacked requested review from a team and scdekov and removed request for alexgrozav February 27, 2026 17:21
@shortstacked shortstacked added this pull request to the merge queue Feb 27, 2026
Merged via the queue into master with commit 7af85fc Feb 27, 2026
45 checks passed
@shortstacked shortstacked deleted the shortstacked/flaky-retry-timeout branch February 27, 2026 17:52
@n8n-assistant n8n-assistant bot mentioned this pull request Mar 2, 2026
Tuukkaa pushed a commit that referenced this pull request Mar 2, 2026
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Mar 3, 2026
@n8n-assistant
Copy link
Contributor

n8n-assistant bot commented Mar 3, 2026

Got released with n8n@2.11.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team Released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants