-
Notifications
You must be signed in to change notification settings - Fork 830
Change tail feature test to use valueMap instead of inject as to not be affected by GLV map ordering #3193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…s to not enforce a specific ordering.
VOTE +1. It's ok to CTR small test fixes like this instead of opening a PR if you'd like. |
Scenario: g_injectXa1_b2_c3X_tailXlocal_1X | ||
Given the empty graph | ||
And the traversal of | ||
""" | ||
g.inject(["a": 1, "b": 2, "c": 3]).tail(Scope.local, 1) | ||
g.inject(["c": 3]).tail(Scope.local, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we use LinkedHashMap internally by default?
or i guess you could unfold().order().fold()
to force it to actually test something, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the ordering issue is not in the step but in the GLV feature test step definition and result parsing. I didn't get a chance to troubleshoot it thoroughly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfold().order().fold()
I can try this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, well, then i think you should CTR this through so that stuff is building with stability.
but seems like there should be some investigation into the test suite then (in part because this test really no longer tests tail
well). is it possible the Go serializer isn't preserving the concept of a LinkedHashMap in serialization? that seems like a reasonable place where this problem would poke its head because the result parsing is getting back {a:1}
and we're only expecting on result so the Map must not be getting there right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed the test to use valueMap()
instead which is a more realistic test than using inject
anyways.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 3.8-dev #3193 +/- ##
==========================================
Coverage ? 76.68%
Complexity ? 14756
==========================================
Files ? 1140
Lines ? 71943
Branches ? 7909
==========================================
Hits ? 55167
Misses ? 13780
Partials ? 2996 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…cted by golang's lack of ordered map.
gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/filter/Tail.feature
Outdated
Show resolved
Hide resolved
VOTE +1 |
https://issues.apache.org/jira/browse/TINKERPOP-2491
Change tail feature test to use
valueMap()
instead ofinject(map)
as to not be affected by go's lack of ordered map data structure. Added a note to go limitations about the lack of native support for ordered map.VOTE +1