Github user gesterzhou commented on a diff in the pull request: https://github.com/apache/incubator-geode/pull/293#discussion_r90296684 --- Diff: geode-core/src/test/java/org/apache/geode/internal/cache/FireAndForgetFunctionOnAllServersDUnitTest.java --- @@ -92,22 +90,23 @@ public void testFireAndForgetFunctionOnAllServers() { // Step 4. Execute the function to put DistributedMemberID into above created replicated // region. - Function function = - new TestFunction(false, TestFunction.TEST_FUNCTION_FIREANDFORGET_ONALL_SERVERS); + Function function = new FireAndForgetFunctionOnAllServers(); FunctionService.registerFunction(function); + PoolImpl pool = (PoolImpl) pool1; + + await().atMost(60, SECONDS) + .until(() -> Assert.assertEquals(1, pool.getCurrentServers().size())); + String regionName = "R1"; Execution dataSet = FunctionService.onServers(pool1); dataSet.withArgs(regionName).execute(function); // Using Awatility, if the condition is not met during the timeout, a // ConditionTimeoutException will be thrown. This makes analyzing the failure much simpler - await().atMost(60, SECONDS).until(() -> { - return (region1.keySetOnServer().size() == 1); - }); - // Step 5. Assert for the region keyset size with 1. - Assert.assertEquals(1, region1.keySetOnServer().size()); + await().atMost(60, SECONDS) + .until(() -> Assert.assertEquals(1, region1.keySetOnServer().size())); --- End diff -- The 2 lines should be moved into line 105
--- 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. ---