KAFKA-3237 - Remove test cases testInvalidDefaultRange() and testInva…#936
KAFKA-3237 - Remove test cases testInvalidDefaultRange() and testInva…#936jcustenborder wants to merge 1 commit into
Conversation
|
If the goal is to have a required parameter with a validator, an alternative solution would be to add a new method to ConfigDef that accepts a validator with no default. The problem is it collides with the existing signature that accepts a default Object with no validator. public ConfigDef define(String name, Type type, Object defaultValue, Importance importance, String documentation)
...
public ConfigDef define(String name, Type type, Validator validator, Importance importance, String documentation)Perhaps a fix utilizing if (this.validator != null && this.hasDefault())
this.validator.ensureValid(name, defaultValue);The reason I am not a fan of the existing change is that |
|
@granthenke I didn't think about the documentation generation use case. I'll add the correct this and resubmit. |
… public and added check for hasDefault(). Original tests work and new test testNullDefaultWithValidator() does as well.
249e4d7 to
ea6e5c6
Compare
|
LGTM |
…Parameters in OptimizationResult. (apache#936)
upgrading netty to 4.1.96.Final
Remove test cases testInvalidDefaultRange() and testInvalidDefaultString(). Defaults if not overridden will get checked on parse. Testing the defaults is unnecessary. This allows you to set that a parameter is required while setting a validator for that parameter. Added a test case testNullDefaultWithValidator that allows a null default with a validator for certain strings.