Repository navigation
TINKERPOP-3304: mergeV() and mergeE() pass a null old value to MutationListener when the property did not exist yet - #3759
paul-lartigau wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 3.7-dev #3759 +/- ##
=============================================
+ Coverage 75.49% 76.02% +0.52%
- Complexity 13161 13356 +195
=============================================
Files 1092 1095 +3
Lines 67208 67725 +517
Branches 7391 7465 +74
=============================================
+ Hits 50742 51491 +749
+ Misses 13837 13587 -250
- Partials 2629 2647 +18 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
For committers - Created PR root bead: tp-632b 🤖 Agent assisted comment. |
|
thanks for submitting this - looking at the tests holistically, i can't help wondering if rather than adding new mergeV/E tests we'd do better to fix the existing ones and perhaps add more in the established pattern. If would you be up for hardening the test cases a bit more with respect to these concerns? i think it would be nice to close these gaps. |
… listeners Assisted-by: Claude Code:claude-opus-5-5
53c76cd to
12ec62c
Compare
|
Thanks, good point. I dropped the two standalone tests and hardened the existing ones instead: |
https://issues.apache.org/jira/browse/TINKERPOP-3304
mergeV()/mergeE()now report a keyed property (KeyedProperty/KeyedVertexProperty) as the old value of a property that did not exist yet, asproperty()does since 3.4.0 (TINKERPOP-1831), instead ofnull. The staleEventJavadoc is aligned.Tests:
StubMutationListenernow records the old values and removed properties it receives, andEventStrategyProcessTestasserts on them:shouldTriggerAddVertexPropertyChangedViaMergeV,shouldTriggerUpdateEdgePropertyAddedViaMergeE, …) now check the old value: a keyed property for a new key, the real previous property otherwise;shouldTriggerAddVertexPropertyAddedViaMergeV,shouldTriggerUpdateEdgePropertyChangedViaMergeE,shouldTriggerEdgePropertyAdded;property()tests now assert theKeyedProperty/KeyedVertexPropertytype;shouldTriggerAddVertexPropertyAddedViaMergeVandshouldTriggerUpdateEdgePropertyAddedViaMergeEfail without the fix.Validated: targeted run of
EventStrategyProcessTestthroughTinkerGraphProcessStandardTest(gremlin-core,gremlin-test,tinkergraph-gremlin) on JDK 17, not a full reactor build. 3.8-dev and master have the same code, the change merges forward.