Flaky Ash Generator
After adding a number of generators to my application's test suite I started noticing that a resource in particular is starting to get flaky. Sometimes it generates valid data but other times it seemingly returns empty data since all validations fail on the resource. The relevent generator code is:
An example error message is attached (I think due to the size of it).
The resource itself is also attached.
I have defined a few extensions to abstract away attribution (inserted by and updated by attributes / relationships) and a tree structure using LTREEs. I didn't include it since I have other resources that are working fine with them but I can certainly include them if it would help. Let me know if I need to provide any additional information.
Solution:Jump to solution
I think I solved it for myself. I didn't realize that Generator was supplying lists of empty maps for an argument
children
which allowed me to generate child entity types at the same time as the parent. Because the maps were empty, they were failing validation. once I started supplying a default value of an empty list, the flakiness seems to have gone away.1 Reply
Solution
I think I solved it for myself. I didn't realize that Generator was supplying lists of empty maps for an argument
children
which allowed me to generate child entity types at the same time as the parent. Because the maps were empty, they were failing validation. once I started supplying a default value of an empty list, the flakiness seems to have gone away.