pivotal-jbarrett commented on code in PR #7381: URL: https://github.com/apache/geode/pull/7381#discussion_r859056143
########## geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/UpdatePropagationDistributedTest.java: ########## @@ -358,22 +356,31 @@ private void verifyUpdates() { }); } + private void verifyMinEntriesInserted() { + await().until(() -> getRegionSizeGreaterThen(minNumEntries)); + } + private void doPuts(int entries) throws Exception { - Region r1 = getCache().getRegion(REGION_NAME); + Region<String, String> r1 = getCache().getRegion(REGION_NAME); assertNotNull(r1); for (int i = 0; i < entries; i++) { try { r1.put("" + i, "" + i); } catch (Exception e) { - // ignore } Thread.sleep(1000); } } + private boolean getRegionSizeGreaterThen(int numEntries) { + Region<String, String> r1 = getCache().getRegion(SEPARATOR + REGION_NAME); + assertNotNull(r1); Review Comment: Use AssertJ here. ########## geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/UpdatePropagationDistributedTest.java: ########## @@ -358,22 +356,31 @@ private void verifyUpdates() { }); } + private void verifyMinEntriesInserted() { + await().until(() -> getRegionSizeGreaterThen(minNumEntries)); + } + private void doPuts(int entries) throws Exception { - Region r1 = getCache().getRegion(REGION_NAME); + Region<String, String> r1 = getCache().getRegion(REGION_NAME); assertNotNull(r1); for (int i = 0; i < entries; i++) { try { r1.put("" + i, "" + i); } catch (Exception e) { - // ignore } Thread.sleep(1000); } } + private boolean getRegionSizeGreaterThen(int numEntries) { + Region<String, String> r1 = getCache().getRegion(SEPARATOR + REGION_NAME); + assertNotNull(r1); + return (r1.size() > numEntries); + } + private int getNotNullEntriesNumber(int entries) { int notNullEntries = 0; - Region r1 = getCache().getRegion(SEPARATOR + REGION_NAME); + Region<String, String> r1 = getCache().getRegion(SEPARATOR + REGION_NAME); assertNotNull(r1); Review Comment: Please replace all with AssertJ. ########## geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/UpdatePropagationDistributedTest.java: ########## @@ -358,22 +356,31 @@ private void verifyUpdates() { }); } + private void verifyMinEntriesInserted() { + await().until(() -> getRegionSizeGreaterThen(minNumEntries)); Review Comment: Try: ```java await().untilAsserted(() -> assertThat(getCache().getRegion(SEPARATOR + REGION_NAME)).hasSizeGreaterThan(minNumEntries)); ``` -- 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-unsubscr...@geode.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org