Improve ergonomics of unit test mocking of ShardRegistry

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • 🟩 Routing and Topology
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, it is quite convoluted for unit tests to set up the desired ShardRegistry state. Often, the way to do so is to mock the response for the network requests that we expect the ShardRegistry to make during reload. (e.g. here or here). The ergonomics of this could be improved by either having a ShardRegistry Mock class, or by having a test-only initialization method for the regular ShardRegistry implementation, where the test code could just provide the expected state, rather than responses to the expected configsvr reads.

            Assignee:
            Unassigned
            Reporter:
            Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: