ddanielr commented on code in PR #3177:
URL: https://github.com/apache/accumulo/pull/3177#discussion_r1093908496
##########
core/src/test/java/org/apache/accumulo/core/conf/PropertyTest.java:
##########
@@ -88,13 +88,80 @@ public void testPorts() {
for (Property prop : Property.values()) {
if (prop.getType().equals(PropertyType.PORT)) {
int port = Integer.parseInt(prop.getDefaultValue());
+ assertTrue(Property.isValidProperty(prop.getKey(),
Integer.toString(port)));
assertFalse(usedPorts.contains(port), "Port already in use: " + port);
usedPorts.add(port);
assertTrue(port > 1023 && port < 65536, "Port out of range of valid
ports: " + port);
}
}
}
+ @Test
+ public void testPropertyValidation() {
+
+ for (Property property : Property.values()) {
+ PropertyType propertyType = property.getType();
+ String invalidValue, validValue = property.getDefaultValue();
+ System.out.printf("Testing property: %s with type: %s\n",
property.getKey(), propertyType);
Review Comment:
Implemented a `Logger` and removed the default print statements.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]