Details
-
Task
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
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.
- for each one, verify that getNamedPropertyValues(true) returns a map with size()==FieldPropertiesExposer.propertyNames.length
Attachments
Issue Links
- is related to
-
SOLR-10549 /schema/fieldtypes doesn't include "large" if configured as a fieldType default
- Closed
-
SOLR-10439 SchemaField.getNamedPropertyValues doesn't include 'large'
- Closed