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 2019/09/05 11:34:18 UTC

[GitHub] [ignite] AMashenkov commented on a change in pull request #6839: IGNITE-11815: replace GridTestUtils.retryAssert with GridTestUtils.waitForCondition

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_r321209913
 
 

 ##########
 File path: modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerSelfTest.java
 ##########
 @@ -248,19 +247,16 @@ public void testDeleteFragmentizing() throws Exception {
 
         igfs.clear();
 
-        GridTestUtils.retryAssert(log, 50, 100, new CA() {
-            @Override public void apply() {
-                for (int i = 0; i < NODE_CNT; i++) {
-                    IgniteEx g = grid(i);
+        for (int i = 0; i < NODE_CNT; i++) {
+            IgniteEx g = grid(i);
 
-                    GridCacheAdapter<Object, Object> cache = ((IgniteKernal)g).internalCache(
-                        g.igfsx("igfs").configuration().getDataCacheConfiguration().getName());
+            GridCacheAdapter<Object, Object> cache = ((IgniteKernal)g).internalCache(
+                    g.igfsx("igfs").configuration().getDataCacheConfiguration().getName());
 
-                    assertTrue("Data cache is not empty [keys=" + cache.keySet() +
-                        ", node=" + g.localNode().id() + ']', cache.isEmpty());
-                }
-            }
-        });
+            boolean isCacheEmpty = GridTestUtils.waitForCondition(() -> cache.isEmpty(), 5000);
 
 Review comment:
   In worst case we will wait for NODE_CNT * 5 sec,
   but before this change w'd wait for 5 sec in total.

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