risdenk commented on a change in pull request #165: KNOX-2057 - Using unique 
table IDs through different test cases even if they are in different test 
classes (JVM is shared in during parallel execution)
URL: https://github.com/apache/knox/pull/165#discussion_r334841919
 
 

 ##########
 File path: 
gateway-shell/src/test/java/org/apache/knox/gateway/shell/table/KnoxShellTableTest.java
 ##########
 @@ -362,11 +362,13 @@ public Object answer() {
   @Test
   public void shouldReturnDifferentCallHistoryForDifferentTables() throws 
Exception {
     final KnoxShellTable table1 = new KnoxShellTable();
-    table1.id(1);
-    KnoxShellTableCallHistory.getInstance().saveCall(1, new 
KnoxShellTableCall("class1", "method1", true, 
Collections.singletonMap("param1", String.class)));
+    final long id1 = KnoxShellTable.getUniqueTableId();
+    table1.id(id1);
 
 Review comment:
   I haven't looked at the implementation but shouldn't a table get a unique ID 
automatically? Do we need to set an id on the table? We should be able to ask 
the table for the id?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to