Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-10490

Make constructors public for Admin API value objects

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.6.0
    • Fix Version/s: None
    • Component/s: clients
    • Labels:

      Description

      Developers writing automation that uses the Admin API will in many cases want to create a mock and configure that mock to return the value objects that is expected to be able to test other pieces of functionality in a controlled way.

      However, since the constructors in the value objects that the various API endpoints return are either protected or the default access level, instantiating such value objects takes needs to use some convoluted trick to create instances (either mock them with a mocking framework, use reflection magic or create a helper method in the same package as they appear).

      Please consider updating the constructor signatures and make them public and in doing so encourage good testing practices everywhere.

      Here are some examples of classes affected by this:

      • CreateTopicsResult
      • DeleteTopicsResult
      • ListTopicsResult
      • DescribeTopicsResult
      • DescribeClusterResult
      • DescribeAclsResult
      • CreateAclsResul
      • DeleteAclsResult
      • DescribeConfigsResult
      • AlterConfigsResult
      • AlterReplicaLogDirsResult
      • DescribeLogDirsResult
      • DescribeReplicaLogDirsResult
      • CreatePartitionsResult
      • CreateDelegationTokenResult
      • RenewDelegationTokenResult
      • ExpireDelegationTokenResult
      • DescribeDelegationTokenResult
      • ...and so on

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              noa Noa Resare
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: