Skip to content

Name the shared test entities for what they hold - #2485

Merged
danielcweber merged 20 commits into
14.xfrom
streamline-test-entities
Oct 1, 2026
Merged

danielcweber merged 20 commits into
14.xfrom
streamline-test-entities

Conversation

@danielcweber

Copy link
Copy Markdown
Contributor

The shared test entities in ExRam.Gremlinq.Tests.Entities are now named for what they hold, not for a made-up domain. Single-purpose types live next to the one test that uses them, and types and members that no test used are gone. Only test code changes; the library does not.

Changes

Before After Why
Person RichVertex the vertex with the most properties of the most kinds
Company SiblingVertex the second vertex below the abstract base
Authority / IAuthority AbstractVertex / IAbstractVertex the abstract base and its interface
Country MetaPropertyVertex carries the meta-properties
Language SimpleVertex one string property and nothing else
TimeFrame ScalarVertex a bool and two TimeSpans
WorksFor RichEdge the edge with several plain properties
LivesIn PropertyEdge the edge with a Property<T>
Speaks EmptyEdge the edge without properties
PropertyValidity MetaModel the meta-property model
Gender { Male, Female, NonBinary } SomeEnum { Zero, One, Two } same numbers; the member holding it is now Enum
EntityWithTwoIntProperties removed its one test now compares RichEdge.From with RichEdge.To
VertexWithListId removed not used
Person.SomeObscureProperty removed not used
VertexWithStringId, EdgeWithStringId nested in QueryExecutionTest one test uses them
ProjectRecord, ProjectRecordStruct Tests.Infrastructure/Projections projection targets only
EverythingAllAtOnce, MetaPoco, PersonLanguageTuple Tests.Infrastructure/GraphSon/Entities (the tuple is now RichVertexSimpleVertexTuple) GraphSON targets only

Every step is its own commit, with the snapshots it changes.

Notes

  • Test names stay. SideEffectTestCaseOrderer runs the tests in name order, and that order decides the ids Gremlin Server hands out. Renaming tests would renumber the integration snapshots.
  • Some changes are reorderings, not just renames. Labels are listed sorted, so a renamed label can move in hasLabel(...) lists and in Groovy binding letters. Gremlin Server also returns some results in an order that depends on names:
    • out() over all edge labels walks the labels in the order given.
    • Grouping by element hashes the projected element, which contains the label.
    • A vertex's properties are kept in a map keyed by name.
  • How the snapshots were made.
    • The snapshots of all tests that need no container were regenerated.
    • The Linux container classes (Gremlin Server, Neptune, JanusGraph) were run locally, one at a time.
    • The CosmosDb emulator snapshots in Gremlinq.Extensions were written by substitution, then re-sorted where Verify sorts by label.
  • The paired Gremlinq.Extensions pull request updates the snapshots there.

🤖 Generated with Claude Code

danielcweber and others added 20 commits October 1, 2026 16:33
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…at uses them

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…sts read into

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
No test sets or reads it. It only showed up in the list of properties that the
Update and Replace tests drop, so those snapshots lose one entry and the bindings
after it move up by one letter.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It served a single test, which compared two of its int properties with each other.
Being a vertex type nevertheless, its label was part of every query that asks for
all vertices. That test now compares WorksFor.From with WorksFor.To instead, which
yields the same where(lt(...)).by(...).by(...) shape, and gives the otherwise only
written To property a reader. As every WorksFor the tests add has From equal to To,
it still finds nothing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The test entities' domain does not stand for anything any more. They only carry
properties of particular types, so they are named for what they hold: this one a
bool and two TimeSpans. Test names that mention TimeFrame stay, as the order the
tests run in follows their names.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It is the vertex with nothing but a single string property. Its label now sorts
last, which moves it to the end of every list of all vertex labels and of every
result grouped by label.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It is the vertex that carries the meta-properties: an untyped one, one with a
dictionary of them, and a string array to ask Properties() about.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Next to Person, it is the second vertex below the abstract Authority, which is what
the tests about abstract types and interfaces query for. Its label now sorts after
Person's, so the lists of labels that stand for Authority change their order.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It is the vertex with the most properties of the most kinds, which is why most
tests use it. Labels that spell it in lower case, to show that a label is matched
regardless of case, now spell richvertex. Test names that mention Person stay, as
the order the tests run in follows their names.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It is the edge without properties, the third edge type that the tests about
several edge labels at once need. Its label now sorts first among the edge labels.
As Gremlin Server walks a vertex's edges label by label, in the order they are
asked for, that moves its edges to the front of what the queries over all edge
labels return there.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It is the edge with a Property<T>, which is what the tests about edge properties
read and write.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It is the edge with several plain properties, which the tests about adding,
updating and replacing edges, and about ignoring members on edges, use.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
They are the abstract base of RichVertex and SiblingVertex and the interface it
implements, which the tests about abstract types, interfaces and inherited member
configuration query for. Their names appear in no snapshot.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It is the model of the meta-properties that AbstractVertex.Name and
SiblingVertex.Locations carry. Its name appears in no snapshot.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It is the tests' general purpose enum. Its values keep their numbers, and their
names now say them: Male, Female and NonBinary become Zero, One and Two. The
GraphSON tests that read the names, in any case, as numbers or combined, now
spell the new ones. The members holding it keep their names for now.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
RichVertex.Gender, and the members of ClassWithEnumConstructor named after the
enum's old name, are named for what they hold now. Enum sorts between Age and
Image just as Gender did, so the order of the property steps is the same. Gremlin
Server keeps a vertex's properties by name, though, so it returns them in another
order for the tests that read all of them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…types it holds

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@danielcweber danielcweber added the skip-changelog Excluded from release notes and description check label Oct 1, 2026
@codecov

codecov Bot commented Oct 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.70%. Comparing base (48327a6) to head (91571ad).

Additional details and impacted files
@@           Coverage Diff           @@
##             14.x    #2485   +/-   ##
=======================================
  Coverage   93.70%   93.70%           
=======================================
  Files         279      279           
  Lines        7905     7905           
  Branches      886      886           
=======================================
  Hits         7407     7407           
  Misses        310      310           
  Partials      188      188           

☔ View full report in Codecov by Harness.
📢 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.

@danielcweber
danielcweber merged commit 91571ad into 14.x Oct 1, 2026
6 checks passed
@danielcweber
danielcweber deleted the streamline-test-entities branch October 1, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Excluded from release notes and description check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant