Increase waiting time for run tests function#252
Increase waiting time for run tests function#252michieldegezelle wants to merge 2 commits intomainfrom
Conversation
WalkthroughUpdates 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
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
lib/liquidTestRunner.js (1)
314-314: Consider makingwaitingLimitconfigurable instead of hardcoded.Line 314 works for this fix, but exposing the timeout via config/env (with
1000000as 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
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (3)
CHANGELOG.mdlib/liquidTestRunner.jspackage.json
Fixes # (link to the corresponding issue if applicable)
Description
Increases the waiting time to avoid liquid tests timing out.
Testing Instructions
Steps:
Author Checklist
Reviewer Checklist