[ 
https://issues.apache.org/jira/browse/TINKERPOP-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16059404#comment-16059404
 ] 

ASF GitHub Bot commented on TINKERPOP-1445:
-------------------------------------------

Github user robertdale commented on a diff in the pull request:

    https://github.com/apache/tinkerpop/pull/631#discussion_r123511769
  
    --- Diff: 
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/PropertyTest.java
 ---
    @@ -59,14 +59,40 @@
         public static class BasicPropertyTest extends AbstractGremlinTest {
             @Test
             @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
    -        public void shouldHaveStandardStringRepresentation() {
    +        public void 
shouldHaveStandardStringRepresentationForVertexProperty() {
                 final Vertex v = graph.addVertex("name", "marko");
                 final Property p = v.property("name");
                 assertEquals(StringFactory.propertyString(p), p.toString());
             }
     
             @Test
             @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
    +        public void 
shouldHaveTruncatedStringRepresentationForVertexProperty() {
    +            final Vertex v = graph.addVertex("name", "maria de la santa 
cruz rosalina agnelia rodriguez cuellar rene");
    +            final Property p = v.property("name");
    +            assertEquals(StringFactory.propertyString(p), p.toString());
    --- End diff --
    
    The only thing that this test validates is that the toString has the same 
output as the StringFactory which may be all well and good.  However, if 
StringFactory changes, the would still pass, but there could be an end-user 
display impact that isn't caught.  I'm not against it as long as we all 
understand the implications. I prefer hardcoded expectations to catch these 
things.


> Large nested VertexProperties and Properties do not get printed well
> --------------------------------------------------------------------
>
>                 Key: TINKERPOP-1445
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1445
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.2.2
>            Reporter: Kevin Gallardo
>            Priority: Minor
>
> {code}
> gremlin> m = ['hello':'world', 'helo':'fromtheotherside']
> ==>hello=world
> ==>helo=fromtheotherside
> gremlin> graph.traversal().E().next().property('longMap', m)
> ==>p[longMap->{hello=world, helo=f]
> {code}
> Maybe the printing could be improved just to at least inform that there's 
> more in the value with a {{...}} or {{\[...\]}} for example.
> It seems to be the {{substring()}} call in 
> [propertyString|https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/StringFactory.java#L113].



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to