fix: broken integration tests (46 failures → 0) - #111
Merged
Conversation
the rename test used keys "old" and "new" which hash to different shards, causing a cross-shard error. use a single shard for this test since it's testing RENAME correctness, not cross-shard behavior. also add shards option to ServerOptions so tests can control shard count.
the proto integration tests spawn ember-server as a subprocess, but the binary wasn't being built with the protobuf feature. add ember-server as a dependency so its protobuf feature is activated when tests are run with --features protobuf.
replace ahash (which uses per-process random seeds) with FNV-1a for shard routing. this ensures keys hash to the same shard across server restarts, which is required for correct AOF and snapshot recovery. without this fix, keys written to shard-0.aof could be routed to shard-1 after restart, causing data to appear lost.
kacy
added a commit
that referenced
this pull request
Feb 19, 2026
* fix: rename integration test uses single shard the rename test used keys "old" and "new" which hash to different shards, causing a cross-shard error. use a single shard for this test since it's testing RENAME correctness, not cross-shard behavior. also add shards option to ServerOptions so tests can control shard count. * fix: propagate protobuf feature to ember-server for integration tests the proto integration tests spawn ember-server as a subprocess, but the binary wasn't being built with the protobuf feature. add ember-server as a dependency so its protobuf feature is activated when tests are run with --features protobuf. * fix: use deterministic hash for shard routing replace ahash (which uses per-process random seeds) with FNV-1a for shard routing. this ensures keys hash to the same shard across server restarts, which is required for correct AOF and snapshot recovery. without this fix, keys written to shard-0.aof could be routed to shard-1 after restart, causing data to appear lost.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
summary
fixes all 46 failing integration tests across three root causes:
error. added a
shardsoption toServerOptionsand run this test with a single shard.protobuffeature, so
--protobufwas an unrecognized flag and the server failed to start within5 seconds. added ember-server as a dependency of the integration test crate so its
protobuffeature is activated when tests run with--features protobuf.ahash::AHasher::default()usesper-process random seeds, so keys hashed to different shards across restarts. replaced
with FNV-1a which is fully deterministic — keys now route to the same shard after restart,
so AOF and snapshot recovery work correctly.
what was tested
full workspace test suite: 1023 tests pass, 0 failures