This is an automated email from the ASF dual-hosted git repository.

xiazcy pushed a commit to branch multi-label-experiment
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 85df245a2fa0ee4240d58defe197bf1cd06cbd08
Author: Yang Xia <[email protected]>
AuthorDate: Thu Mar 5 09:38:12 2026 -0800

    Add some feature test
---
 .../gremlin/test/features/map/MergeVertex.feature  | 124 +++++++++++++++++++++
 1 file changed, 124 insertions(+)

diff --git 
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/MergeVertex.feature
 
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/MergeVertex.feature
index 801b39db7f..930e3a181b 100644
--- 
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/MergeVertex.feature
+++ 
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/MergeVertex.feature
@@ -990,3 +990,127 @@ Feature: Step - mergeV()
     Then the result should have a count of 1
     And the graph should return 1 for count of 
"g.V().has(\"person\",\"name\",\"stephen\").hasNot(\"created\")"
     And the graph should return 2 for count of "g.V()"
+
+  @MultiLabel
+  Scenario: g_mergeVXlabel_ab_name_markoX_multilabel_create
+    Given the empty graph
+    And the traversal of
+      """
+      g.mergeV([(T.label): ["person","employee"], name: "marko"])
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 1 for count of "g.V()"
+    And the graph should return 1 for count of 
"g.V().hasLabel(\"person\").hasLabel(\"employee\")"
+    And the graph should return 1 for count of "g.V().has(\"name\",\"marko\")"
+
+  @MultiLabel
+  Scenario: g_mergeVXlabel_abc_name_testX_multilabel_create
+    Given the empty graph
+    And the traversal of
+      """
+      g.mergeV([(T.label): ["a","b","c"], name: "test"])
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 1 for count of "g.V()"
+    And the graph should return 1 for count of 
"g.V().hasLabel(\"a\").hasLabel(\"b\").hasLabel(\"c\")"
+
+  @MultiLabel
+  Scenario: g_mergeVXlabel_person_name_markoX_single_label
+    Given the empty graph
+    And the traversal of
+      """
+      g.mergeV([(T.label): "person", name: "marko"])
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 1 for count of "g.V()"
+    And the graph should return 1 for count of "g.V().hasLabel(\"person\")"
+    And the graph should return 1 for count of "g.V().has(\"name\",\"marko\")"
+
+  @MultiLabel
+  Scenario: g_mergeVXlabel_ab_name_markoX_multilabel_match
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").addLabel("employee").property("name", "marko")
+      """
+    And the traversal of
+      """
+      g.mergeV([(T.label): ["person","employee"], name: "marko"])
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 1 for count of "g.V()"
+    And the graph should return 1 for count of 
"g.V().hasLabel(\"person\").hasLabel(\"employee\")"
+
+  @MultiLabel
+  Scenario: g_mergeVXlabel_ab_name_markoX_multilabel_nomatch
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("name", "marko")
+      """
+    And the traversal of
+      """
+      g.mergeV([(T.label): ["person","employee"], name: "marko"])
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 2 for count of "g.V()"
+
+  @MultiLabel
+  Scenario: g_mergeVXlabel_person_name_markoX_optionXonMatch_label_managerX
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").addLabel("employee").property("name", "marko")
+      """
+    And the traversal of
+      """
+      g.mergeV([(T.label): "person", name: "marko"]).
+          option(Merge.onMatch, [(T.label): "manager"])
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 1 for count of "g.V()"
+    And the graph should return 1 for count of "g.V().hasLabel(\"manager\")"
+    And the graph should return 0 for count of "g.V().hasLabel(\"person\")"
+    And the graph should return 0 for count of "g.V().hasLabel(\"employee\")"
+
+  @MultiLabel
+  Scenario: 
g_mergeVXlabel_person_name_markoX_optionXonMatch_label_manager_directorX
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("name", "marko")
+      """
+    And the traversal of
+      """
+      g.mergeV([(T.label): "person", name: "marko"]).
+          option(Merge.onMatch, [(T.label): ["manager","director"]])
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 1 for count of "g.V()"
+    And the graph should return 1 for count of 
"g.V().hasLabel(\"manager\").hasLabel(\"director\")"
+    And the graph should return 0 for count of "g.V().hasLabel(\"person\")"
+
+  @MultiLabel
+  Scenario: g_mergeVXlabel_person_name_markoX_optionXonMatch_label_emptyX
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property("name", "marko")
+      """
+    And the traversal of
+      """
+      g.mergeV([(T.label): "person", name: "marko"]).
+          option(Merge.onMatch, [(T.label): []])
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 1 for count of "g.V()"
+    And the graph should return 1 for count of "g.V().hasLabel(\"vertex\")"
+    And the graph should return 0 for count of "g.V().hasLabel(\"person\")"

Reply via email to