Skip to content

kafka: decouple admin tests from Sarama #5885

Description

@3AceShowHand

Parent

What to build

Make Kafka admin tests depend on a library-independent AdminClient contract. Preserve missing-config handling, Admin API error classification, authorization fallback, and resource cleanup without exposing Sarama types through test interfaces.

Acceptance criteria

  • ClusterAdminClient is renamed to AdminClient.
  • Authorization failures use a library-independent Kafka admin error while ErrKafkaAdminAPI remains the general Admin API error.
  • Admin and topic manager tests do not import or refer to Sarama.
  • Missing config, authorization fallback, general Admin API failure, and resource cleanup remain covered.
  • Sarama-specific admin interfaces and mocks are confined to adapter-only tests; common AdminClient and topic manager behavior tests use TiCDC-owned mocks.

Metadata

Metadata

Assignees

Labels

component/kafkaTiCDC kafka sinkcomponent/testUnit tests and integration tests component.type/refactorThe issue belongs to a refactor work.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions