Centralize the CloudSolrClient mock setup used by CrossDC tests - #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....? |
|
@sigram can you give this a review? I'd like oto merge it in hte next day or so to get it off my WIP queue! |
Description
Found that I missed properly mocking everything when I did the Kafka 3 to 4 migration.
Solution
Centralize the CloudSolrClient mock setup used by these tests. SolrMessageProcessor reads live nodes from the client’s ClusterStateProvider; the shared helper configures that dependency consistently.
Tests
Reran the tests.
Checklist