Ignore specific scenarios
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/33e87aa2 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/33e87aa2 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/33e87aa2 Branch: refs/heads/master Commit: 33e87aa2135498319ed0e8442254733748a96b23 Parents: bfd9d57 Author: Jorge Bay Gondra <jorgebaygon...@gmail.com> Authored: Fri Nov 17 13:59:42 2017 +0100 Committer: Jorge Bay Gondra <jorgebaygon...@gmail.com> Committed: Thu Nov 30 10:00:09 2017 +0100 ---------------------------------------------------------------------- .../Gherkin/GherkinTestRunner.cs | 33 ++++++++++++++++++++ .../Gherkin/IgnoreException.cs | 11 ++++++- 2 files changed, 43 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/33e87aa2/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs index b03211c..a3748ee 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs @@ -40,6 +40,31 @@ namespace Gremlin.Net.IntegrationTest.Gherkin { public class GherkinTestRunner { + private static readonly IDictionary<string, IgnoreReason> IgnoredScenarios = + new Dictionary<string, IgnoreReason> + { + { "g_V_hasLabelXpersonX_projectXa_bX_byXoutE_countX_byXageX", IgnoreReason.ScenarioDesignMapNumbers }, + { "g_V_matchXa_knows_b__b_created_cX", IgnoreReason.MapCoersionIssue}, + { "g_V_valueMap_matchXa_selectXnameX_bX", IgnoreReason.MapCoersionIssue}, + { "g_V_matchXa_out_bX", IgnoreReason.MapCoersionIssue}, + { "g_V_outXcreatedX_unionXasXprojectX_inXcreatedX_hasXname_markoX_selectXprojectX__asXprojectX_inXcreatedX_inXknowsX_hasXname_markoX_selectXprojectXX_groupCount_byXnameX", + IgnoreReason.ScenarioDesignMapNumbers}, + { "g_V_hasLabelXpersonX_asXpX_mapXbothE_label_groupCountX_asXrX_selectXp_rX", + IgnoreReason.ScenarioDesignMapNumbers}, + { "g_V_label_groupCount_asXxX_selectXxX", IgnoreReason.ScenarioDesignMapNumbers}, + { "g_V_outXfollowedByX_group_byXsongTypeX_byXbothE_group_byXlabelX_byXweight_sumXX", + IgnoreReason.ScenarioDesignMapNumbers}, + { "g_V_repeatXbothXfollowedByXX_timesX2X_groupXaX_byXsongTypeX_byXcountX_capXaX", + IgnoreReason.ScenarioDesignMapNumbers}, + { "g_V_repeatXbothXfollowedByXX_timesX2X_group_byXsongTypeX_byXcountX", + IgnoreReason.ScenarioDesignMapNumbers}, + { "g_V_repeatXout_groupXaX_byXnameX_byXcountX_timesX2X_capXaX", IgnoreReason.ScenarioDesignMapNumbers}, + { "g_V_hasXlangX_group_byXlangX_byXcountX", IgnoreReason.ScenarioDesignMapNumbers}, + { "g_V_hasLabelXsongX_group_byXnameX_byXproperties_groupCount_byXlabelXX", IgnoreReason.MapCoersionIssue}, + { "g_V_hasLabelXsongX_groupXaX_byXnameX_byXproperties_groupCount_byXlabelXX_out_capXaX", + IgnoreReason.MapCoersionIssue}, + }; + private static class Keywords { public const string Given = "GIVEN"; @@ -84,6 +109,11 @@ namespace Gremlin.Net.IntegrationTest.Gherkin { var failedSteps = new Dictionary<Step, Exception>(); resultFeature.Scenarios[scenario] = failedSteps; + if (IgnoredScenarios.TryGetValue(scenario.Name, out var reason)) + { + failedSteps.Add(scenario.Steps.First(), new IgnoreException(reason)); + break; + } StepBlock? currentStep = null; StepDefinition stepDefinition = null; foreach (var step in scenario.Steps) @@ -361,6 +391,9 @@ namespace Gremlin.Net.IntegrationTest.Gherkin "/Users/jorge/workspace/tinkerpop/gremlin-test/features/map/Mean.feature", "/Users/jorge/workspace/tinkerpop/gremlin-test/features/sideEffect/Sack.feature", + "/Users/jorge/workspace/tinkerpop/gremlin-test/features/sideEffect/Group.feature", +// "/Users/jorge/workspace/tinkerpop/gremlin-test/features/sideEffect/GroupCount.feature", +// "/Users/jorge/workspace/tinkerpop/gremlin-test/features/sideEffect/Inject.feature", }; // var files = new [] {"/Users/jorge/workspace/temp/count.feature"}; // var files = Directory.GetFiles(path, "*.feature", SearchOption.AllDirectories); http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/33e87aa2/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs ---------------------------------------------------------------------- diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs index ae236c7..a19d856 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs @@ -43,6 +43,13 @@ namespace Gremlin.Net.IntegrationTest.Gherkin case IgnoreReason.LambdaNotSupported: reasonSuffix = " because lambdas are not supported in Gremlin.NET"; break; + case IgnoreReason.MapCoersionIssue: + reasonSuffix = " because there is conversion issue for IDictionary<K, V> instaces in" + + " Gremlin.NET (TINKERPOP-1837)"; + break; + case IgnoreReason.ScenarioDesignMapNumbers: + reasonSuffix = " because the expected result contains lenient numeric numbers"; + break; } return $"Scenario ignored" + reasonSuffix; } @@ -50,6 +57,8 @@ namespace Gremlin.Net.IntegrationTest.Gherkin public enum IgnoreReason { - LambdaNotSupported + LambdaNotSupported, + ScenarioDesignMapNumbers, + MapCoersionIssue } } \ No newline at end of file