Skip to content

fix(loadgen): update ValkeyAddr → ValkeyAddrs in test fixtures#213

Merged
Joey0538 merged 1 commit into
mainfrom
fix/loadgen-valkeyaddrs-test
May 21, 2026
Merged

fix(loadgen): update ValkeyAddr → ValkeyAddrs in test fixtures#213
Joey0538 merged 1 commit into
mainfrom
fix/loadgen-valkeyaddrs-test

Conversation

@ngangwar962
Copy link
Copy Markdown
Collaborator

@ngangwar962 ngangwar962 commented May 21, 2026

Summary

Root cause

PR #199 migrated all services from single-node VALKEY_ADDR to cluster-mode VALKEY_ADDRS. The production code in main.go was updated, but the newly-added test file main_test.go (added by a concurrent PR that landed after #199) used the old field name in three inline config struct literals.

Fix

-cfg := &config{..., ValkeyAddr: "localhost:1"}
+cfg := &config{..., ValkeyAddrs: []string{"localhost:1"}}

Applied to all three affected test cases (TestDispatch_MembersSustained_UnknownPreset, TestDispatch_MembersSustained_RejectsBadShape, TestDispatch_MembersCapacity_RequiresTargetSize).

Test plan

  • make lint — 0 errors after fix
  • make test SERVICE=tools/loadgen — passes

https://claude.ai/code/session_01RVazYxcu73oBNFePtSiTMp


Generated by Claude Code

Summary by CodeRabbit

  • Tests
    • Updated configuration field references in dispatch-related tests to maintain alignment with the current configuration structure. Changes applied across multiple test scenarios covering configuration validation, preset handling, and capacity assessment to ensure consistency in test setup.

Review Change Stack

main_test.go was missed when PR #199 renamed the config field from
ValkeyAddr string to ValkeyAddrs []string, causing a typecheck lint failure
on main.

https://claude.ai/code/session_01RVazYxcu73oBNFePtSiTMp
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9be4a560-c2bd-4a18-9c09-7f313c60b145

📥 Commits

Reviewing files that changed from the base of the PR and between b39d3e5 and 7a7cb41.

📒 Files selected for processing (1)
  • tools/loadgen/main_test.go

📝 Walkthrough

Walkthrough

Three test functions in the loadgen test suite are updated to construct the config object using the new ValkeyAddrs field shape (string slice) instead of the deprecated ValkeyAddr field (string) for consistent test setup alignment.

Changes

Config Field Shape Alignment

Layer / File(s) Summary
Test config updates for ValkeyAddrs field
tools/loadgen/main_test.go
Three dispatch tests—TestDispatch_MembersSustained_UnknownPreset, TestDispatch_MembersSustained_RejectsBadShape, and TestDispatch_MembersCapacity_RequiresTargetSize—are updated to construct config using ValkeyAddrs: []string{"localhost:1"} instead of ValkeyAddr: "localhost:1".

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A rabbit hops through tests so neat,
Three config fields get fresh retreat,
From strings to slices, all aligned,
The API shape now redefined! 🐰✨

🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: updating the ValkeyAddr field to ValkeyAddrs in test fixtures, which aligns with the actual changes made to three dispatch-related tests.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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 fix/loadgen-valkeyaddrs-test

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@Joey0538 Joey0538 merged commit 3081526 into main May 21, 2026
6 checks passed
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.

3 participants