Skip to content

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

Merged
merged 4 commits into from
Aug 21, 2025

Conversation

andreachild
Copy link
Contributor

@andreachild andreachild commented Aug 21, 2025

https://issues.apache.org/jira/browse/TINKERPOP-2491

Change tail feature test to use valueMap() instead of inject(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

@andreachild andreachild changed the base branch from master to 3.8-dev August 21, 2025 17:05
@Cole-Greer
Copy link
Contributor

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)
Copy link
Contributor

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?

Copy link
Contributor Author

@andreachild andreachild Aug 21, 2025

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.

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor Author

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-commenter
Copy link

codecov-commenter commented Aug 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (3.8-dev@544ed90). Learn more about missing BASE report.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andreachild andreachild changed the title Change tail feature test to no longer enforce ordering Change tail feature test to use valueMap instead of inject as to not be affected by GLV map ordering Aug 21, 2025
@xiazcy
Copy link
Contributor

xiazcy commented Aug 21, 2025

VOTE +1

@andreachild andreachild merged commit 6aad191 into apache:3.8-dev Aug 21, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants