Skip to content

Add Redis adapter tests#3

Merged
BobbieBarker merged 1 commit into
mainfrom
redis-adapter-tests
Feb 22, 2026
Merged

Add Redis adapter tests#3
BobbieBarker merged 1 commit into
mainfrom
redis-adapter-tests

Conversation

@BobbieBarker

@BobbieBarker BobbieBarker commented Feb 22, 2026

Copy link
Copy Markdown
Owner
  • Fix RedisCase to properly set persistent_term adapter and resolve capabilities (was only setting Application env which SchemaCache doesn't read first)
  • Fix RedisAdapter mget/1 to handle empty key list (Redis rejects bare MGET)

@codecov codecov Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The changes in the diff encompass additions of new test cases, addition of new Redis operations in the adapter, and updates to the Redis test setup. The changes are by-and-large correct, however, there are areas for potential improvement. The main issues lay with hard-coded values in tests, lack of error handling, non-standard return values, and missing key features in the Redis adapter. These issues are detailed in the comments below.

Comment thread test/schema_cache/adapters/redis_adapter_set_ops_test.exs
Comment thread test/schema_cache/adapters/redis_adapter_set_ops_test.exs
Comment thread test/schema_cache/adapters/redis_adapter_set_ops_test.exs
Comment thread test/schema_cache/adapters/redis_adapter_set_ops_test.exs
Comment thread test/schema_cache/adapters/redis_adapter_set_ops_test.exs
Comment thread test/schema_cache/adapters/redis_adapter_set_ops_test.exs
Comment thread test/schema_cache/adapters/redis_adapter_test.exs
Comment thread test/schema_cache/adapters/redis_adapter_test.exs
Comment thread test/support/redis_adapter.ex
Comment thread test/support/redis_case.ex

@codecov codecov Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Overall, the implementation is solid and adheres to the best practices in using redis and ETS. But, there are still a few improvements needed, most of them centered around error handling and the proper use of persistent_term.

Comment thread test/support/redis_adapter.ex
Comment thread test/support/redis_case.ex
Comment thread test/support/redis_case.ex
Comment thread test/support/redis_case.ex
Comment thread test/support/redis_case.ex
Comment thread test/support/redis_case.ex
@BobbieBarker BobbieBarker merged commit e0978e1 into main Feb 22, 2026
5 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.

1 participant