li-boxuan commented on code in PR #1657:
URL: https://github.com/apache/tinkerpop/pull/1657#discussion_r876504970


##########
tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphProvider.java:
##########
@@ -107,7 +107,7 @@ protected static boolean requiresPersistence(final Class<?> 
test, final String t
      */
     protected static boolean requiresListCardinalityAsDefault(final 
LoadGraphWith.GraphData loadGraphWith,
                                                             final Class<?> 
test, final String testMethodName) {
-        return loadGraphWith == LoadGraphWith.GraphData.CREW
+        return loadGraphWith == LoadGraphWith.GraphData.CREW && 
!testMethodName.startsWith("shouldReadWriteCrew")

Review Comment:
   The test `shouldReadWriteCrew` actually works fine without this change. 
However, in the old logic, whenever the graph is `CREW`, we always use LIST 
cardinality as the default cardinality in tests, which conceals the problem 
described in 
https://issues.apache.org/jira/projects/TINKERPOP/issues/TINKERPOP-2742.
   
   While I agree hardcoding is not a good practice, this method already 
hardcodes some test names including `shouldAttachWithCreateMethod` and 
`testAttachableCreateMethod`. Since this is just a graph provider under the 
`test` package, I presume it is okay to do so.



-- 
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