ignite-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [ignite] AMashenkov commented on a change in pull request #6839: IGNITE-11815: replace GridTestUtils.retryAssert with GridTestUtils.waitForCondition
Date Thu, 05 Sep 2019 11:41:17 GMT
AMashenkov commented on a change in pull request #6839: IGNITE-11815: replace GridTestUtils.retryAssert
with GridTestUtils.waitForCondition
URL: https://github.com/apache/ignite/pull/6839#discussion_r321212235
 
 

 ##########
 File path: modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java
 ##########
 @@ -461,22 +462,28 @@ private final void checkMaps(final boolean strict, final GridDhtCacheAdapter<Str
 
                         GridDhtPartitionMap cmpMap = cmp.get(nodeId);
 
-                        assert cmpMap != null;
-
-                        assert nodeMap.keySet().equals(cmpMap.keySet());
+                        if (cmpMap == null || !nodeMap.keySet().equals(cmpMap.keySet()))
{
+                            info("Cache key set is not equal to nodeMap key set, rerun");
+                            return false;
+                        }
 
                         for (Map.Entry<Integer, GridDhtPartitionState> nodeEntry :
nodeMap.entrySet()) {
                             GridDhtPartitionState state = cmpMap.get(nodeEntry.getKey());
 
-                            assert state != null;
-                            assert state != GridDhtPartitionState.EVICTED;
-                            assert !strict || state == GridDhtPartitionState.OWNING : "Invalid
partition state: " + state;
-                            assert state == nodeEntry.getValue();
+                            boolean isOk =
+                                state != null
+                                && state != GridDhtPartitionState.EVICTED
+                                && (!strict || state == GridDhtPartitionState.OWNING)
+                                && state == nodeEntry.getValue();
+                            if (!isOk) {
+                                info("Entry state is invalid, rerun");
 
 Review comment:
   Typo. Seems, you mean "Partition state", not an entry state.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message