kop
kop copied to clipboard
[FEATURE] Support checking the KafkaRequestHandler in tests
Is your feature request related to a problem? Please describe.
Currently KoP doesn't support retrieving the active channels (i.e. KafkaRequestHandlers) in tests. It limits the test that it cannot check if the fields of the channel are expected. Currently KoP only supports creating a mocked KafkaRequestHandler whose ctx field is a mocked ChannelHandlerContext.
Describe the solution you'd like
A simple solution is to add a setChannelInitializers method to KafkaProtocolHandler to change the channelInitializerMap field.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context
Here is an ideal effect of checking KafkaRequestHandlers:
