You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The result of FailoverIntrospector is intended.
When using the FailoverIntrospector, you must specify the PropertyGenerator while FieldReflectionArbitraryIntrospector provides the default PropertyGenerator.
You switch the FieldReflectionArbitraryIntrospector to FailoverIntrospector, so the properties generated by FieldReflectionArbitraryIntrospector are gone.
However, there is a bug when generating a record instance with two constructors. Let you know when it is fixed.
I have specified .pushAssignableTypeArbitraryIntrospector(Record.class, ConstructorPropertiesArbitraryIntrospector.INSTANCE), so I would expect all Records to be generated using this generator and not via the FailoverIntrospector. If I remove that FailoverIntrospector that is how it behaves but when I add it the behavior changes.
Seems wrong having to specify a PropertyGenerator. Each Introspector was their own way of generating properties and the FailoverIntrospector should let the Introspector use their own.
Otherwise what´s the point of using the FailoverIntrospector? From my point of view the FailoverIntrospector should just call each Introspector until one was able to generate the value.
Describe the bug
When using a
FailoverIntrospector
the generation fails when generating a record.This fails:
This works (The only difference is the FailoverIntrospector):
Your environment
Steps to reproduce
I´m unable to replicate this issue standalone. Here works fine but it fails in my production code.
https://github.com/esfomeado/fixture-monkey-bug/blob/master/src/test/java/com/example/bug/FixtureMonkeyTest.java#L157
Most likely something else is conflicting with this.
Expected behaviour
Should generate the value just fine
Actual behaviour
It fails to generate, no error but all fields are null
The text was updated successfully, but these errors were encountered: