Repository: tinkerpop Updated Branches: refs/heads/master 2f1a9d09c -> 918d986c0
Removed a hardcoded expectation in test suite around metrics serialization CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/a94baa0e Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/a94baa0e Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/a94baa0e Branch: refs/heads/master Commit: a94baa0e017ff40f45642b1b1286e5e1cfc7c391 Parents: c4b0f9d Author: Stephen Mallette <[email protected]> Authored: Thu Jan 11 09:57:27 2018 -0500 Committer: Stephen Mallette <[email protected]> Committed: Thu Jan 11 09:57:27 2018 -0500 ---------------------------------------------------------------------- CHANGELOG.asciidoc | 1 + .../apache/tinkerpop/gremlin/structure/SerializationTest.java | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a94baa0e/CHANGELOG.asciidoc ---------------------------------------------------------------------- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index ed32f05..c388425 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -24,6 +24,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima === TinkerPop 3.2.8 (Release Date: NOT OFFICIALLY RELEASED YET) * Delayed setting of the request identifier until `RequestMessage` construction by the builder. +* Removed hardcoded expectation in metrics serialization test suite as different providers may have different outputs. [[release-3-2-7]] === TinkerPop 3.2.7 (Release Date: December 17, 2017) http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a94baa0e/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java ---------------------------------------------------------------------- diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java index 4dacf48..1de30de 100644 --- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java +++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java @@ -213,7 +213,7 @@ public class SerializationTest { final GryoWriter gryoWriter = gryoIo.writer().create(); final GryoReader gryoReader = gryoIo.reader().create(); - final TraversalMetrics before = (TraversalMetrics) g.V().both().profile().next(); + final TraversalMetrics before = g.V().both().profile().next(); final ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); gryoWriter.writeObject(outputStream, before); @@ -355,7 +355,7 @@ public class SerializationTest { @LoadGraphWith(LoadGraphWith.GraphData.MODERN) public void shouldSerializeTraversalMetrics() throws Exception { final ObjectMapper mapper = graph.io(GraphSONIo.build()).mapper().create().createMapper(); - final TraversalMetrics tm = (TraversalMetrics) g.V().both().profile().next(); + final TraversalMetrics tm = g.V().both().profile().next(); final String json = mapper.writeValueAsString(tm); final Map<String, Object> m = mapper.readValue(json, mapTypeReference); @@ -363,7 +363,7 @@ public class SerializationTest { assertTrue(m.containsKey(GraphSONTokens.METRICS)); final List<Map<String, Object>> metrics = (List<Map<String, Object>>) m.get(GraphSONTokens.METRICS); - assertEquals(2, metrics.size()); + assertEquals(tm.getMetrics().size(), metrics.size()); final Map<String, Object> metrics0 = metrics.get(0); assertTrue(metrics0.containsKey(GraphSONTokens.ID));
