Skip to content

Improve KafkaBrokerConfigurationDiffTest with config entries having different sources #11859

@ppatierno

Description

@ppatierno

The KafkaBrokerConfigurationDiffTest has a big limitation related to how the current broker configuration is created by using the instantiateConfigEntry() method.
Such method creates all the entries with DEFAULT_CONFIG source and, for example, STRING as a type which are of course not valid for all properties.
Reading a real broker config, there are several source being STATIC_BROKER_CONFIG and one, min.insync.replicas being DYNAMIC_DEFAULT_BROKER_CONFIG. Creating all properties as DEFAULT_CONFIG limits the opportunities for testing. For example the KafkaBrokerConfigurationDiff.removeProperty() will never generate a DELETE operation, everything will be ignored because all current configs are DEFAULT_CONFIG by construction.
We should try to make the entries creation more similar to what we can get from a real broker.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions