Hoss Man created SOLR-10518:
-------------------------------
Summary: Need whitebox testing of FieldProperties constants &
SchemaField.getNamedPropertyValues(true)
Key: SOLR-10518
URL: https://issues.apache.org/jira/browse/SOLR-10518
Project: Solr
Issue Type: Task
Security Level: Public (Default Security Level. Issues are Public)
Reporter: Hoss Man
SOLR-10439 is an example of a bug in
{{SchemaField.getNamedPropertyValues(true)}} that could have been caught if we
had an automated whitebox test of all known field properties.
we should add some tests to ensure future bugs like this don't surprise us
again...
* add a {{static FieldPropertiesExposer extends FieldProperties}}
** include a new method to use reflection to expose all {{protected final
static int}} constants inherited from {{FieldProperties}}
** include new public methods to expose {{propertyNames\[\]}}
{{propertyNameToInt(String)}} and {{getPropertyName(int)}}
* assert that the number int constants is the same as {{propertyNames.size}}
* loop over all property names and confirm a round trip of
{{getPropertyName(propertyNameToInt(name))}}
* loop over all constnats and confirm a round trip of
{{propertyNameToInt(getPropertyName(constant))}}
* use the IndexSchema (pointed at some relatively robust kitchen sink of a
schema.xml) to loop over every {{FieldType}}, {{SchemaField}} and
{{DynamicField.getPrototype()}}:
** for each one, verify that {{getNamedPropertyValues(true)}} returns a map
with {{size()==FieldPropertiesExposer.propertyNames.length}}
*** minus any special cases that are deliberaly excuded, like BINARY.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]