Rice
Rice
ATApache TinkerPop
Created by Rice on 11/7/2024 in #questions
Structure Test Suite - Test Data Types and Serialization Types Don't Match?
This issue is based on some assumptions I've and knowledge from my team. Correct me please if any of it is wrong or misguided. An ongoing thing we're doing is better supporting the structure testing suite and having a more accurate features list for our Graph. Array types are supported by our Graph, and the way we handled it is by using Lists, since when GLVs serialize property values of type array or list they come in as an ArrayList. However, the structure test suite, namely PropertyTest, sends the property value type directly to the graph as int[]{1, 2, 3} for example which breaks our Graph since we only expected ArrayList due to the expectation of serialization. In response, I made our Graph handle this by containing the values in a List if it were to see an array passed in as a property value. Not the best, since it adds overhead for a scenario that wouldn't exist in real use, but anyways... However, this did not fix the issue, as even after doing this, PropertyTest also expects the value coming back out to be an array instead of a List. 1. What's the best way of handling this, if there even is one, without either reworking how our Graph functions under the hood or opting out of the tests? 2. I think the test suite is flawed to be using arrays, as this does not match what the serializer gives to the Graph, which can be considered the source of truth?
3 replies