gesterzhou commented on a change in pull request #6430: URL: https://github.com/apache/geode/pull/6430#discussion_r641731023
########## File path: geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearDUnitTest.java ########## @@ -430,13 +423,54 @@ public void normalClearFromClient() { .isEqualTo(0); } + @Test + public void testClearTime() { + configureServers(false, true); + client1.invoke(this::initClientCache); + client2.invoke(this::initClientCache); + + accessor.invoke(() -> feed(false)); + verifyServerRegionSize(NUM_ENTRIES); + dataStore1.invoke(() -> { + PartitionedRegion partitionedRegion = (PartitionedRegion) getRegion(false); + assertThat(partitionedRegion.getCachePerfStats().getClearTime()).isEqualTo(0L); + }); + dataStore1.invoke(() -> getRegion(false).clear()); + verifyServerRegionSize(0); + dataStore1.invoke(() -> { + PartitionedRegion partitionedRegion = (PartitionedRegion) getRegion(false); + assertThat(partitionedRegion.getCachePerfStats().getClearTime()).isGreaterThan(0L); Review comment: It's better to use "<10" instead of ">0". It maybe 0 in some fast machine. -- 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: us...@infra.apache.org