phreed commented on a change in pull request #1544:
URL: https://github.com/apache/tinkerpop/pull/1544#discussion_r783365507



##########
File path: 
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversalMetricsTest.java
##########
@@ -47,18 +47,19 @@ public void shouldPrintIndentationsCorrectly() {
         childMetrics.addNested(backendMetrics);
 
         final DefaultTraversalMetrics profile = new 
DefaultTraversalMetrics(100, metrics);
-        final String expectedOutput = "Traversal Metrics\n" +
-                "Step                                                          
     Count  Traversers       Time (ms)    % Dur\n" +
-                
"=============================================================================================================\n"
 +
-                "GraphStep                                                     
                                 0.000\n" +
-                "  GraphQuery                                                  
                                 0.000\n" +
-                "    \\_condition=name = Bob\n" +
-                "    AND-Query                                                 
                                 0.000\n" +
-                "      \\_index=gIndex\n" +
-                "      \\_query-hint=ZSORTED\n" +
-                "      backend-query                                           
                                 0.000\n" +
-                "        \\_query=gIndex:slice-query\n" +
+        final String LS = System.lineSeparator();
+        final String expectedOutput = "Traversal Metrics" + LS +
+                "Step                                                          
     Count  Traversers       Time (ms)    % Dur" + LS +
+                
"============================================================================================================="
 + LS +
+                "GraphStep                                                     
                                 0.000" + LS +
+                "  GraphQuery                                                  
                                 0.000" + LS +
+                "    \\_condition=name = Bob" + LS +
+                "    AND-Query                                                 
                                 0.000" + LS +
+                "      \\_index=gIndex" + LS +
+                "      \\_query-hint=ZSORTED" + LS +
+                "      backend-query                                           
                                 0.000" + LS +
+                "        \\_query=gIndex:slice-query" + LS +
                 "                                            >TOTAL            
         -           -           0.000        -";
-        assertEquals(expectedOutput, profile.toString());

Review comment:
       As you recommended the expected-output is modified to include the 
system-line-separator rather than "repairing" the actual profile.  I also added 
a title to the assertEquals call.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to