Skip to content

Make single-server fast path tests actually use a single server#1127

Merged
petergoldstein merged 1 commit into
petergoldstein:mainfrom
ilianah:fix-single-server-fast-path-tests
Jul 12, 2026
Merged

Make single-server fast path tests actually use a single server#1127
petergoldstein merged 1 commit into
petergoldstein:mainfrom
ilianah:fix-single-server-fast-path-tests

Conversation

@ilianah

@ilianah ilianah commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

The tests for the single server fast path batch methods used test helpers that build clients with two address aliases for the same memcached process (https://github.com/petergoldstein/dalli/blob/main/test/utils/memcached_manager.rb#L43-L47), so every client got a 2 server ring and batch operations were always going through the pipelined path.

Add a single_server_client test helper that builds a client with a single address, and use it in those tests so they actually hit the fast path.

The tests for the single server fast path batch methods used test helpers that build clients with two address aliases for the same memcached process (https://github.com/petergoldstein/dalli/blob/main/test/utils/memcached_manager.rb#L43-L47), so every client got a 2 server ring and batch operations were always going through the pipelined path.
Add a `single_server_client` test helper that builds a client with a single address, and use it in those tests so they actually hit the fast path.
@petergoldstein petergoldstein merged commit 1bfa2fd into petergoldstein:main Jul 12, 2026
10 checks passed
@petergoldstein

Copy link
Copy Markdown
Owner

Thanks @ilianah

petergoldstein added a commit to ilianah/dalli that referenced this pull request Jul 13, 2026
Adds a Features entry for delete_multi returning a deleted-key count
(petergoldstein#1126) and a Maintenance entry for the single-server fast path test
fix (petergoldstein#1127), bringing the Unreleased section current with all
substantive PRs merged since 5.0.5.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants