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

    https://github.com/apache/storm/pull/1690#discussion_r79492402
  
    --- Diff: 
external/sql/storm-sql-core/src/test/org/apache/storm/sql/compiler/backends/trident/TestPlanCompiler.java
 ---
    @@ -274,4 +276,9 @@ private void waitForCompletion(long timeout, 
Callable<Boolean> cond) throws Exce
           Thread.sleep(100);
         }
       }
    +
    +  private void assertArrayWithoutOrder(List<Values> expected, 
List<List<Object>> actual) {
    +    Assert.assertTrue("Two arrays are not same!\n"+ "Expected: " + 
expected + "\n" + "Actual: " + actual,
    +            expected.containsAll(actual) && actual.containsAll(expected));
    --- End diff --
    
    @satishd Yes I missed the duplicated items. 
    Btw, if we assume the duplication, checking size equality seems not enough 
too, since `[a b b a a]` and `[b b a a b]` is same length but it's not actually 
same. 
    Checking cardinality of each element seems to be the safest way, and if the 
type of element is comparable, we can copy & sort two arrays and compare with 
ordered way.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to