You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Nick Reich (JIRA)" <ji...@apache.org> on 2017/07/17 22:47:00 UTC
[jira] [Commented] (GEODE-3180) CI failure:
org.apache.geode.internal.cache.partitioned.PersistentColocatedPartitionedRegionDUnitTest.testFullTreeOfColocatedChildPRsWithMissingRegions
fails with org.mockito.exceptions.verification.NoInteractionsWanted
[ https://issues.apache.org/jira/browse/GEODE-3180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16090734#comment-16090734 ]
Nick Reich commented on GEODE-3180:
-----------------------------------
It looks like this is an intermittent timing issue within the test (looking at the git history, it has been "fixed" in GEODE-2095 before to try and deal with its flaky nature). Here is the problem region of code:
{code}
// acknowledge interactions with the mock that have occurred
verify(mockAppender, atLeastOnce()).getName();
verify(mockAppender, atLeastOnce()).isStarted();
try {
// Another delay before exiting the thread to make sure that missing region logging
// doesn't continue after all regions are created (delay > logInterval)
Thread.sleep(logInterval * 2);
verifyNoMoreInteractions(mockAppender);
} finally {
logger.removeAppender(mockAppender);
}
{code}
There still appears to be issues with this test and validating occurrences of logging. Do we have a better pattern for doing this? Do we want to be validating the occurrence of logging at all (instead of the actual behavior that has occurred)?
> CI failure: org.apache.geode.internal.cache.partitioned.PersistentColocatedPartitionedRegionDUnitTest.testFullTreeOfColocatedChildPRsWithMissingRegions fails with org.mockito.exceptions.verification.NoInteractionsWanted
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: GEODE-3180
> URL: https://issues.apache.org/jira/browse/GEODE-3180
> Project: Geode
> Issue Type: Bug
> Components: regions
> Reporter: Lynn Gallinat
>
> {noformat}
> org.apache.geode.internal.cache.partitioned.PersistentColocatedPartitionedRegionDUnitTest > testFullTreeOfColocatedChildPRsWithMissingRegions FAILED
> java.lang.AssertionError: An exception occurred during asynchronous invocation.
> at org.apache.geode.test.dunit.AsyncInvocation.checkException(AsyncInvocation.java:148)
> at org.apache.geode.test.dunit.AsyncInvocation.get(AsyncInvocation.java:422)
> at org.apache.geode.internal.cache.partitioned.PersistentColocatedPartitionedRegionDUnitTest.testFullTreeOfColocatedChildPRsWithMissingRegions(PersistentColocatedPartitionedRegionDUnitTest.java:1298)
> Caused by:
> org.mockito.exceptions.verification.NoInteractionsWanted:
> No interactions wanted here:
> -> at org.apache.geode.internal.cache.partitioned.PersistentColocatedPartitionedRegionDUnitTest$14.call(PersistentColocatedPartitionedRegionDUnitTest.java:1232)
> But found this interaction on mock 'appender':
> -> at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:156)
> ***
> For your reference, here is the list of all invocations ([?] - means unverified).
> 1. -> at org.apache.logging.log4j.core.config.AbstractConfiguration.addLoggerAppender(AbstractConfiguration.java:694)
> 2. -> at org.apache.logging.log4j.core.config.AppenderControl.<init>(AppenderControl.java:51)
> 3. -> at org.apache.logging.log4j.core.config.AppenderControl.ensureAppenderStarted(AppenderControl.java:134)
> 4. -> at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:156)
> 5. -> at org.apache.logging.log4j.core.config.AppenderControl.ensureAppenderStarted(AppenderControl.java:134)
> 6. [?]-> at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:156){noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)