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

spmallette pushed a commit to branch TINKERPOP-3028
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 648b1f92706f27571a1d83f6c17168eb1b22af8f
Author: Stephen Mallette <[email protected]>
AuthorDate: Fri May 31 14:01:17 2024 -0400

    Get C# tests working by properly ignoring tests that include lambdas that 
aren't translated
---
 .../Process/Traversal/GraphTraversal.cs            | 11 -------
 .../Gherkin/GherkinTestRunner.cs                   | 35 ++++++++++++++++------
 .../Gherkin/IgnoreException.cs                     |  7 ++++-
 .../Traversal/Translator/GroovyTranslatorTests.cs  |  2 +-
 4 files changed, 33 insertions(+), 22 deletions(-)

diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs 
b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
index 1f7c7ee048..13b9beca57 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
@@ -1770,22 +1770,11 @@ namespace Gremlin.Net.Process.Traversal
             return Wrap<TStart, TEnd>(this);
         }
 
-        /// <summary>
-        ///     Adds the property step to this <see 
cref="GraphTraversal{SType, EType}" />.
-        /// </summary>
-        public GraphTraversal<TStart, TEnd> Property(IDictionary value)
-        {
-            Bytecode.AddStep("property", value);
-            return Wrap<TStart, TEnd>(this);
-        }
-
         /// <summary>
         ///     Adds the property step to this <see 
cref="GraphTraversal{SType, EType}" />.
         /// </summary>
         public GraphTraversal<TStart, TEnd> Property (IDictionary<object, 
object> map)
         {
-            if (map == null) throw new ArgumentNullException(nameof(map));
-
             Bytecode.AddStep("property", map);
             return Wrap<TStart, TEnd>(this);
         }
diff --git 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index a28730be0d..f669045255 100644
--- 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -51,7 +51,32 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
                 {"g_withStrategiesXProductiveByStrategyX_V_group_byXageX", 
IgnoreReason.NullKeysInMapNotSupported},
                 
{"g_withStrategiesXProductiveByStrategyX_V_groupCount_byXageX", 
IgnoreReason.NullKeysInMapNotSupported},
                 {"g_withoutStrategiesXCountStrategyX_V_count", 
IgnoreReason.NoReason}, // needs investigation
-                
{"g_withoutStrategiesXLazyBarrierStrategyX_V_asXlabelX_aggregateXlocal_xX_selectXxX_selectXlabelX",
 IgnoreReason.NoReason}
+                
{"g_withoutStrategiesXLazyBarrierStrategyX_V_asXlabelX_aggregateXlocal_xX_selectXxX_selectXlabelX",
 IgnoreReason.NoReason},
+                {"g_V_outXcreatedX_hasXname__mapXlengthX_isXgtX3XXX_name", 
IgnoreReason.LambdasNotTranslated},
+                {"g_V_filterXfalseX", IgnoreReason.LambdasNotTranslated},
+                {"g_V_filterXtrueX", IgnoreReason.LambdasNotTranslated},
+                {"g_V_filterXlang_eq_javaX", 
IgnoreReason.LambdasNotTranslated},
+                {"g_VX1X_filterXage_gt_30X", 
IgnoreReason.LambdasNotTranslated},
+                {"g_VX2X_filterXage_gt_30X", 
IgnoreReason.LambdasNotTranslated},
+                {"g_VX1X_out_filterXage_gt_30X", 
IgnoreReason.LambdasNotTranslated},
+                {"g_V_filterXname_startsWith_m_OR_name_startsWith_pX", 
IgnoreReason.LambdasNotTranslated},
+                {"g_E_filterXfalseX", IgnoreReason.LambdasNotTranslated},
+                {"g_E_filterXtrueX", IgnoreReason.LambdasNotTranslated},
+                {"g_VX1X_mapXnameX", IgnoreReason.LambdasNotTranslated},
+                {"g_VX1X_outE_label_mapXlengthX", 
IgnoreReason.LambdasNotTranslated},
+                {"g_VX1X_out_mapXnameX_mapXlengthX", 
IgnoreReason.LambdasNotTranslated},
+                {"g_VX1X_out_mapXlambdaXnameXX_mapXlambdaXlengthXX", 
IgnoreReason.LambdasNotTranslated},
+                {"g_withPath_V_asXaX_out_mapXa_nameX", 
IgnoreReason.LambdasNotTranslated},
+                {"g_withPath_V_asXaX_out_out_mapXa_name_it_nameX", 
IgnoreReason.LambdasNotTranslated},
+                {"g_V_valueMap_unfold_mapXkeyX", 
IgnoreReason.LambdasNotTranslated},
+                {"g_V_hasLabelXpersonX_order_byXvalueXageX_descX_name", 
IgnoreReason.LambdasNotTranslated},
+                
{"g_VX1X_hasXlabel_personX_mapXmapXint_ageXX_orderXlocalX_byXvalues_descX_byXkeys_ascX",
 IgnoreReason.LambdasNotTranslated},
+                {"g_V_group_byXname_substring_1X_byXconstantX1XX", 
IgnoreReason.LambdasNotTranslated},
+                {"g_VX1X_out_name_injectXdanielX_asXaX_mapXlengthX_path", 
IgnoreReason.LambdasNotTranslated},
+                {"g_V_groupXaX_byXname_substring_1X_byXconstantX1XX_capXaX", 
IgnoreReason.LambdasNotTranslated},
+                
{"g_V_repeatXbothX_untilXname_eq_marko_or_loops_gt_1X_groupCount_byXnameX", 
IgnoreReason.LambdasNotTranslated},
+                {"g_V_chooseXlabel_eqXpersonX__outXknowsX__inXcreatedXX_name", 
IgnoreReason.LambdasNotTranslated},
+                
{"g_V_branchXlabel_eq_person__a_bX_optionXa__ageX_optionXb__langX_optionXb__nameX",
 IgnoreReason.LambdasNotTranslated},
             };
 
         private static class Keywords
@@ -115,14 +140,6 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
                         continue;
                     }
 
-                    // if a lambda is present then the Gremlin isn't 
translated and thus not supported - until we
-                    // officially get rid of this stuff
-                    if (Gremlin.HasTraversal(scenario.Name))
-                    {
-                        failedSteps.Add(scenario.Steps.First(), new 
IgnoreException(IgnoreReason.NoReason));
-                        continue;
-                    }
-
                     StepBlock? currentStep = null;
                     StepDefinition? stepDefinition = null;
                     foreach (var step in scenario.Steps)
diff --git 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
index 04d5a06249..d409cc4dec 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
@@ -60,6 +60,11 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
         /// <summary>
         /// The GLV suite does not test against a graph that has null property 
values enabled.
         /// </summary>
-        NullPropertyValuesNotSupportedOnTestGraph
+        NullPropertyValuesNotSupportedOnTestGraph,
+
+        /// <summary>
+        /// Tests with lambdas can't be translated. This should be removed 
once lambdas are completely dropped.
+        /// </summary>
+        LambdasNotTranslated
     }
 }
\ No newline at end of file
diff --git 
a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/Translator/GroovyTranslatorTests.cs
 
b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/Translator/GroovyTranslatorTests.cs
index 07fdae471c..94932d9c26 100644
--- 
a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/Translator/GroovyTranslatorTests.cs
+++ 
b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/Translator/GroovyTranslatorTests.cs
@@ -420,7 +420,7 @@ public class GroovyTranslatorTests
             { _g.V("44").OutE().ElementMap<object>(), 
"g.V('44').outE().elementMap()" },
             { _g.V("44").ValueMap<object, object>().By(__.Unfold<object>()), 
"g.V('44').valueMap().by(__.unfold())" },
             {
-                _g.V().Property(new Dictionary<string, object> { { "name", 
"test" }, { "age", 30 } }),
+                _g.V().Property(new Dictionary<object, object> { { "name", 
"test" }, { "age", 30 } }),
                 "g.V().property(['name': 'test', 'age': 30])"
             },
             { _g.V().E("1"), "g.V().E('1')" },

Reply via email to