lhotari commented on pull request #11697: URL: https://github.com/apache/pulsar/pull/11697#issuecomment-901008509
To unit test the logic, I'd recommend doing a refactoring. It seems that it's possible to just override the setter "setBacklogQuotaDefaultLimitGB" in ServiceConfiguration class and update the backlogQuotaDefaultLimitBytes field on the fly. It's necessary to keep the backlogQuotaDefaultLimitGB field so that the FieldContext annotation can be used for documenting the field. I would add a getBacklogQuotaDefaultLimitGB() method with private access to ensure that the method isn't used anywhere in the code directly anymore. ServiceConfiguration isn't part of any public API, there's no need to keep API backwards compatibility for the class itself. As long as the configuration file format is supported, it's sufficient. After making this refactoring, it's sufficient to unit test the logic of ServiceConfiguration class. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org