From 2d6c28a4781786238866bbc942d7706e16ec628e Mon Sep 17 00:00:00 2001 From: Stephen Mallette Date: Thu, 5 Apr 2018 08:59:56 -0400 Subject: [PATCH] TINKERPOP-1927 Coerced BulkSet to g:List in GraphSON 3.0 Since GLVs don't have BulkSet infrastructure and the need to include it doesn't seem high the most direct fix here is to coerce to g:List as the behavior for BulkSet iteration is basically that same as a List. --- CHANGELOG.asciidoc | 7 +++++++ .../structure/io/graphson/GraphSONTypeSerializerV3d0.java | 3 ++- .../Gherkin/GherkinTestRunner.cs | 5 +---- .../Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs | 6 ------ 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index d07cea835a2..ad9085af0b2 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -20,6 +20,13 @@ limitations under the License. image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/images/gremlin-mozart.png[width=185] +[[release-3-3-3]] +=== TinkerPop 3.3.3 (Release Date: NOT OFFICIALLY RELEASED YET) + +This release also includes changes from <>. + +* Coerced `BulkSet` to `g:List` in GraphSON 3.0. + [[release-3-3-2]] === TinkerPop 3.3.2 (Release Date: April 2, 2018) diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV3d0.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV3d0.java index 3bdbc7128f4..2cd57dcec70 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV3d0.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV3d0.java @@ -26,6 +26,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.Scope; import org.apache.tinkerpop.gremlin.process.traversal.Traverser; import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalOptionParent; +import org.apache.tinkerpop.gremlin.process.traversal.step.util.BulkSet; import org.apache.tinkerpop.gremlin.process.traversal.step.util.Tree; import org.apache.tinkerpop.gremlin.process.traversal.util.Metrics; import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalMetrics; @@ -124,7 +125,7 @@ protected Class getClassFromObject(final Object o) { mapped = Tree.class; else mapped = Map.class; - } else if (List.class.isAssignableFrom(c)) + } else if (List.class.isAssignableFrom(c) || BulkSet.class.isAssignableFrom(c)) // coerce BulkSet to List as their behavior on iteration is identical mapped = List.class; else if (Set.class.isAssignableFrom(c)) mapped = Set.class; diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs index 68d10fe0851..6d38ccc2950 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs @@ -38,10 +38,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin public class GherkinTestRunner { private static readonly IDictionary IgnoredScenarios = - new Dictionary - { - {"g_V_storeXaX_byXoutEXcreatedX_countX_out_out_storeXaX_byXinEXcreatedX_weight_sumX", IgnoreReason.ReceivedDataDoesntMatchExpected} - }; + new Dictionary(); private static class Keywords { diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs index 711fc2044d8..d5d6dfd2947 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs @@ -40,15 +40,9 @@ private static string GetMessage(IgnoreReason reason) string reasonSuffix = null; switch (reason) { - case IgnoreReason.TraversalTDeserializationNotSupported: - reasonSuffix = " as deserialization of g:T on GraphSON3 is not supported"; - break; case IgnoreReason.NoReason: reasonSuffix = ""; break; - case IgnoreReason.ReceivedDataDoesntMatchExpected: - reasonSuffix = " because received data from server doesn't match expected data."; - break; } return $"Scenario ignored" + reasonSuffix; }