This is an automated email from the ASF dual-hosted git repository.

nnag pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new d0fcdfc  GEODE-1319: Awaitility clause added.
d0fcdfc is described below

commit d0fcdfcb1146a2079af817e8107f31b48f8a45f2
Author: nabarun <n...@pivotal.io>
AuthorDate: Tue Oct 17 17:52:35 2017 -0700

    GEODE-1319: Awaitility clause added.
    
        * After the receiver's region size is checked, immediately the 
afterAcknowledgement stat is checked in the sender
        * In a slow system, the ack may not have arrived, or was not yet 
processed enough to call the listeners at the moment when the stats were 
checked.
        * Waiting for a little more time may result in the stat to be updated 
and test not failing.
---
 .../geode/internal/cache/wan/misc/PDXNewWanDUnitTest.java  | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git 
a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/misc/PDXNewWanDUnitTest.java
 
b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/misc/PDXNewWanDUnitTest.java
index 38a91e6..f2f4472 100644
--- 
a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/misc/PDXNewWanDUnitTest.java
+++ 
b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/misc/PDXNewWanDUnitTest.java
@@ -14,12 +14,15 @@
  */
 package org.apache.geode.internal.cache.wan.misc;
 
+import org.awaitility.Awaitility;
 import org.junit.Ignore;
 import org.junit.experimental.categories.Category;
 import org.junit.Test;
 
 import static org.junit.Assert.*;
 
+import java.util.concurrent.TimeUnit;
+
 import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase;
 import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
 import org.apache.geode.test.junit.categories.DistributedTest;
@@ -604,7 +607,6 @@ public class PDXNewWanDUnitTest extends WANTestBase {
   }
 
 
-  @Category(FlakyTest.class) // GEODE-1319
   @Test
   public void testWANPDX_RR_SerialSenderWithFilter() {
     Integer lnPort = (Integer) vm0.invoke(() -> 
WANTestBase.createFirstLocatorWithDSId(1));
@@ -713,9 +715,13 @@ public class PDXNewWanDUnitTest extends WANTestBase {
 
 
   public static void verifyFilterInvocation(int invocation) {
-    assertEquals(((PDXGatewayEventFilter) eventFilter).beforeEnqueueInvoked, 
invocation);
-    assertEquals(((PDXGatewayEventFilter) eventFilter).beforeTransmitInvoked, 
invocation);
-    assertEquals(((PDXGatewayEventFilter) eventFilter).afterAckInvoked, 
invocation);
+    Awaitility.await().atMost(60, TimeUnit.SECONDS).until(
+        () -> assertEquals(((PDXGatewayEventFilter) 
eventFilter).beforeEnqueueInvoked, invocation));
+    Awaitility.await().atMost(60, TimeUnit.SECONDS)
+        .until(() -> assertEquals(((PDXGatewayEventFilter) 
eventFilter).beforeTransmitInvoked,
+            invocation));
+    Awaitility.await().atMost(60, TimeUnit.SECONDS).until(
+        () -> assertEquals(((PDXGatewayEventFilter) 
eventFilter).afterAckInvoked, invocation));
   }
 
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <commits@geode.apache.org>'].

Reply via email to