Skip to content

Increase waiting time for run tests function#252

Open
michieldegezelle wants to merge 2 commits intomainfrom
avoid_timeout_errors_liquid_tests
Open

Increase waiting time for run tests function#252
michieldegezelle wants to merge 2 commits intomainfrom
avoid_timeout_errors_liquid_tests

Conversation

@michieldegezelle
Copy link
Copy Markdown
Contributor

Fixes # (link to the corresponding issue if applicable)

Description

Increases the waiting time to avoid liquid tests timing out.

Testing Instructions

Steps:

  1. Run the tests for a very big template and see if the timeout error still appears.

Author Checklist

  • Skip bumping the CLI version

Reviewer Checklist

  • PR has a clear title and description
  • Manually tested the changes that the PR introduces
  • Changes introduced are covered by tests of acceptable quality

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 14, 2026

Walkthrough

Updates package version from 1.54.0 to 1.54.1 with a changelog entry documenting an increase to the test run timeout threshold to prevent timeout errors. The polling timeout in the test runner function is increased accordingly.

Changes

Cohort / File(s) Summary
Version and Metadata Updates
CHANGELOG.md, package.json
Bumped version to 1.54.1 and added changelog entry documenting timeout increase to prevent test run failures.
Test Timeout Threshold
lib/liquidTestRunner.js
Increased waitingLimit from 500000 to 1000000 milliseconds in the fetchResult() function to extend the polling duration before timeout.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: increasing the waiting time in the test runner to prevent timeouts.
Description check ✅ Passed The description follows the template structure with Description and Testing Instructions sections completed, though the issue link is not filled and test coverage checklist item is incomplete.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch avoid_timeout_errors_liquid_tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
lib/liquidTestRunner.js (1)

314-314: Consider making waitingLimit configurable instead of hardcoded.

Line 314 works for this fix, but exposing the timeout via config/env (with 1000000 as default) will make CI/local tuning easier and avoid future code edits for timeout-only changes.

💡 Proposed refactor
-  const waitingLimit = 1000000;
+  const waitingLimit = Number(process.env.SF_TEST_WAITING_LIMIT_MS || 1000000);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/liquidTestRunner.js` at line 314, Replace the hardcoded constant
waitingLimit with a configurable value read from configuration or environment
(e.g., process.env.LIQUID_WAITING_LIMIT) and fallback to 1000000 as the default;
update the declaration of waitingLimit in liquidTestRunner.js to parse the
env/config value to a number, validate it (positive integer) and use that
variable everywhere the original waitingLimit constant was referenced (e.g., in
any wait/timeouts inside functions that reference waitingLimit) so tests/CI can
override the timeout without code edits.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@lib/liquidTestRunner.js`:
- Line 314: Replace the hardcoded constant waitingLimit with a configurable
value read from configuration or environment (e.g.,
process.env.LIQUID_WAITING_LIMIT) and fallback to 1000000 as the default; update
the declaration of waitingLimit in liquidTestRunner.js to parse the env/config
value to a number, validate it (positive integer) and use that variable
everywhere the original waitingLimit constant was referenced (e.g., in any
wait/timeouts inside functions that reference waitingLimit) so tests/CI can
override the timeout without code edits.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9733bd2d-be9c-47b9-974b-d4dcc9f04a71

📥 Commits

Reviewing files that changed from the base of the PR and between 840b02d and f802d3c.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • CHANGELOG.md
  • lib/liquidTestRunner.js
  • package.json

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant