DRIVER-EU/node-test-bed-adapter

very similar code in parts of schema-registry and schema-publisher

HugoJBello opened this issue · 0 comments

I have a suggestion.
I have observed that the method isSchemaRegistryAvailable in the classes SchemaRegistry and SchemaPublisher is very similar. The only difference that I see is that in SchemaRegisty the maximum number of retries is fixed. I wander if it would not be better to avoid code repetition by creating a parent class (SchemaAccess or Schema) that has this method and then make the other two classes inherit from it.

I have realised this because I am working in the test bed adapter for python and I have faced a similar issue.

Thanks in advance.