You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/03/02 13:47:02 UTC

[GitHub] [ignite] anton-vinogradov commented on a change in pull request #9807: IGNITE-16071 Read Repair futures should be rewritten to use wait-free sync instead of synchronized

anton-vinogradov commented on a change in pull request #9807:
URL: https://github.com/apache/ignite/pull/9807#discussion_r817705088



##########
File path: modules/core/src/test/java/org/apache/ignite/internal/processors/cache/consistency/AbstractFullSetReadRepairTest.java
##########
@@ -270,20 +270,20 @@
      * @param data Data.
      */
     protected void check(ReadRepairData data, IgniteIrreparableConsistencyViolationException e, boolean evtRecorded) {
-        Collection<?> irreparableKeys = e != null ? e.irreparableKeys() : null;
+        Collection<Object> irreparableKeys = e != null ? e.irreparableKeys() : null;
 
         if (e != null) {
-            Collection<?> repairableKeys = e.repairableKeys();
+            Collection<Object> repairableKeys = e.repairableKeys();
 
             if (repairableKeys != null)
                 assertTrue(Collections.disjoint(repairableKeys, irreparableKeys));
 
-            Collection<?> expectedToBeIrreparableKeys = data.data.entrySet().stream()
+            Collection<Object> expectedToBeIrreparableKeys = data.data.entrySet().stream()
                 .filter(entry -> !entry.getValue().repairable)
                 .map(Map.Entry::getKey)
                 .collect(Collectors.toSet());
 
-            assertEquals(expectedToBeIrreparableKeys, irreparableKeys);
+            assertEqualsCollectionsIgnoringOrder(expectedToBeIrreparableKeys, irreparableKeys);

Review comment:
       Because equals fails on different collection types.
   Possible solution is to call Collections.unmodifiableMap(..) over expectedToBeIrreparableKeys, but this will look odd ...




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org