Follow-up from "Upgrade redis gem to v5"
The following discussion from !141213 (merged) should be addressed:
-
@drew started a discussion: (+1 comment) I don't have my head quite wrapped around the testing strategy here, but it seems like we're somewhat rewriting the implementation of
read_multiplehere, as an operational process for checking the value written bywrite_multipleIs there a cleaner way to test this? Would using
write_multipleandread_multipletogether be a more cohesive way to assert that "what we mean to write gets written, as shown by our ability to read it back out an assert equivalence"? Or would using both method in the test create a sort of interdependency that we don't want?I don't have a strong opinion here, but noticed the code similarity so wondering what you think.
The issue involves refactoring spec/lib/gitlab/discussions_diff/highlight_cache_spec.rb for the #write_multiple and #read_multiple specs based on the above concerns.