Skip to content

fix(tests): correct Decimal round-trip assertion in redis cache test#12

Open
deangoodmanson wants to merge 1 commit intomainfrom
fix/redis-cache-decimal-test-v2
Open

fix(tests): correct Decimal round-trip assertion in redis cache test#12
deangoodmanson wants to merge 1 commit intomainfrom
fix/redis-cache-decimal-test-v2

Conversation

@deangoodmanson
Copy link
Copy Markdown
Collaborator

Summary

  • Fixes a pre-existing test failure in test_redis_cache_set_get (in core/src/cache/redis.rs)
  • rust_decimal::Decimal values may deserialize with a different internal scale encoding after a JSON round-trip, causing assert_eq! to fail even when values are numerically equal
  • Fix: compare via .to_string() rather than direct assert_eq! on the Decimal values

Changes

  • core/src/cache/redis.rs: ~4 lines changed in one assertion

Test plan

  • cargo test -p kruxiaflow-core --lib — all unit tests pass
  • Specifically test_redis_cache_set_get passes (requires Redis running locally)

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <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.

1 participant