Refactor a bit mock set up so we do it one place one way. - #4823
Conversation
|
ai generated this module already has integration tests over the same code path — SimpleSolrIntegrationTest, ZkConfigIntegrationTest, SolrAndKafkaReindexTest — running against a real MiniSolrCloudCluster. They passed throughout. The mock-based tests are the ones that wedged CI, and they're the ones that had to be hand-edited to keep compiling. (end) Makes me question if this module needs mocks in the first place. I hate mocks. But I didn't look with my own eyes closely. |
I share your sentiment on the Mocks. Many of the tests in this module don't use mocks... I specifically asked about eliminating the all together, and the only reaosn I went with mocks was that when I aske claude about "hey, how do I tickle this specific data scenario with real embedded solr etc" it said it would jump up the test time! I didn't actually try to do that and verify that the test duration would increase.. I'd be open to givign that a stab and just seeing....? |
Description
Found that I missed properly mocking everything when I did the Kafka 3 to 4 migration.
Solution
Instead of each class doing it's own mocking, have a shared helper.
Tests
Reran the tests.
Checklist