Skip to content

Node: Fix flaky FLUSHALL timeout in commonjs-test.cjs - #6737

Draft
xShinnRyuu wants to merge 1 commit into
valkey-io:mainfrom
xShinnRyuu:fix-commonjs-test-flushall-timeout
Draft

Node: Fix flaky FLUSHALL timeout in commonjs-test.cjs#6737
xShinnRyuu wants to merge 1 commit into
valkey-io:mainfrom
xShinnRyuu:fix-commonjs-test-flushall-timeout

Conversation

@xShinnRyuu

Copy link
Copy Markdown
Collaborator

Summary

Fix flaky FLUSHALL timeout in the commonjs-test.cjs hybrid node modules test by increasing the client's requestTimeout from the default 250ms to 5000ms.

Issue link

This Pull Request is linked to issue: [Node][Flaky Test] commonjs-test.cjs - FLUSHALL timeout in hybrid node modules test
Closes #6736

Features / Behaviour Changes

No behaviour changes. This PR fixes test flakiness only.

Implementation

Root cause: The GlideClient in commonjs-test.cjs was using the default requestTimeout of 250ms. In CI environments (GitHub Actions runners) under load, the system can be saturated even at command submission time, causing simple commands like FLUSHALL to exceed this timeout. The timeout_watchdog confirmed: "system was already saturated at submission time."

Fix: Set requestTimeout: 5000 (5 seconds) in the GlideClient.createClient configuration. This is generous enough for CI environments under load while still catching actual connection issues. This aligns with the pattern used in the main test suite (TestUtilities.ts uses 1000ms, and specific tests use up to 10000ms).

Limitations

None

Testing

  • Verified the fix is consistent with the requestTimeout configuration pattern used throughout the test suite (e.g., node/tests/TestUtilities.ts sets 1000ms by default, GlideClient.test.ts uses 10000ms for certain operations)
  • The change is a single configuration value addition with no logic changes

Checklist

  • This Pull Request is related to one issue.
  • Commit message has a detailed description of what changed and why.
  • Tests are added or updated.
  • CHANGELOG.md updated - N/A for flaky-test fixes; do NOT add a changelog entry.
  • Lint checked manually (matched surrounding style; lint tools not run locally).
  • Destination branch is correct - main or release

…ALL timeout

The FLUSHALL command in the commonjs-test.cjs hybrid node modules test
was timing out after 250ms (the default) with ServerUnresponsive cause.
The timeout_watchdog reported the system was already saturated at
submission time in CI environments.

Increase requestTimeout from the default 250ms to 5000ms, which is
generous enough for CI environments under load while still catching
actual connection issues.

Signed-off-by: xShinnRyuu <xshinnryuu@users.noreply.github.com>
@xShinnRyuu xShinnRyuu added node 🐢 Node.js wrapper Flaky-tests 🐦 Flaky-tests AI Generated For any AI generated content from our own workflows/maintainers. labels Aug 8, 2026
@valkey-review-bot

Copy link
Copy Markdown
Contributor

Commit 2a71f22 needs two metadata fixes before merge:

  • The DCO check fails because the author is Thomas Zhou <54688146+xShinnRyuu@users.noreply.github.com>, while the Signed-off-by line is xShinnRyuu <xshinnryuu@users.noreply.github.com>. Amend the commit so its sign-off matches the author identity.
  • The subject Node: Increase requestTimeout in commonjs-test.cjs to fix flaky FLUSHALL timeout does not follow the repository's required <type>(<scope>): <description> format. A fitting subject would be test(node): increase request timeout in CommonJS hybrid test.

Please amend the commit and force-push the branch.

@valkey-review-bot valkey-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The test-only timeout change matches the Node client configuration contract and the existing 5-second example. No code-level concerns found. The commit metadata issues are noted separately because they cannot be anchored to the diff.

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

Labels

AI Generated For any AI generated content from our own workflows/maintainers. Flaky-tests 🐦 Flaky-tests node 🐢 Node.js wrapper

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Node][Flaky Test] commonjs-test.cjs - FLUSHALL timeout in hybrid node modules test

1 participant