[
https://issues.apache.org/jira/browse/GEODE-5407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16702162#comment-16702162
]
ASF subversion and git services commented on GEODE-5407:
--------------------------------------------------------
Commit 4ca93d8ee867de270dc32d9b2ce16513005fa11b in geode's branch
refs/heads/develop from Helena A. Bales
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=4ca93d8 ]
GEODE-5407: fix JMXMBeanReconnectDUnitTest timing
This test class had several timing isses for the remote MBean tests.
This PR fixes all known timing issues, which were MBean inconsistencies
in the before() and trouble reconnecting stopped members, as well as
insufficiently strict assertions (comparing lists with
.containsExactlyElementsOf() is not commutative). This commit also
changes MemberVM's forceDisconnect to use a blackboard mailbox instead
of a fixed amount of time to decid when to start reconnecting. It also
adds functionality to the ConcurrencyRule to act as an awaitility.
* In waitForLocatorsToAgreeOnMembership, called from the before, the
MBeans that each locator has were only compared by list size. Now they
are compared element by element, and the sizes are checked to be
correct.
* In waitForLocatorToAgreeOnMembership, the wait was returning
prematurely after the first pass due to Awaitlity.untilAsserted not
working correctly. For this method, a simple implementation using
assertions and Awaitility caused memory issues, so the current
implementation uses do/while loops, compares the lists element by
element, and starts a single thread that is allowed to run for 300
seconds.
* In the tests, the timing was not strictly enforced. The disconnect and
starting the reconnect now happen in different threads. The thread that
starts the reconnect checks that the disconnect has happened, gathers
relevant information, then signals that reconnect can start, which the
reconnect thread now checks for. This ensures that we don't gather
MBeans before the member has fully stopped, and that reconnect does not
start until we've gathered the MBeans.
* Assertions have been made more strict by checking that lists against
each other twice, since Assertions.containsExactlyElementsOf() is not
commutative.
* Use a blackboard entry to check if the stopped member should start
reconnecting in the reconnect listener attached from MemberVM when
forcing a member to disconnect.
* Add functionality to ConcurrencyRule to act as an awaitility,
expecting a value to eventually be true. This was added during the
process of trying to solve this bug but is not used in the final
implementation.
> org.apache.geode.management.JMXMBeanReconnectDUnitTest >
> testRemoteBeanKnowledge_MaintainServerAndCrashLocator and
> testLocalBeans_MaintainServerAndCrashLocator FAILED
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: GEODE-5407
> URL: https://issues.apache.org/jira/browse/GEODE-5407
> Project: Geode
> Issue Type: Bug
> Reporter: Jinmei Liao
> Assignee: Helena Bales
> Priority: Major
> Labels: pull-request-available, swat
> Attachments: Test results - Class
> org.apache.geode.management.JMXMBeanReconnectDUnitTest.html
>
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
> org.apache.geode.management.JMXMBeanReconnectDUnitTest >
> testRemoteBeanKnowledge_MaintainServerAndCrashLocator FAILED
> [
> |https://concourse.apachegeode-ci.info/teams/main/pipelines/develop/jobs/DistributedTest/builds/103#L5b401925:249]
> org.apache.geode.test.dunit.RMIException: While invoking
> org.apache.geode.test.dunit.rules.MemberVM$$Lambda$73/2140274979.run in VM 0
> running on Host 640ab3da6905 with 4 VMs
> [
> |https://concourse.apachegeode-ci.info/teams/main/pipelines/develop/jobs/DistributedTest/builds/103#L5b401925:250]
> at org.apache.geode.test.dunit.VM.invoke(VM.java:436)
> [
> |https://concourse.apachegeode-ci.info/teams/main/pipelines/develop/jobs/DistributedTest/builds/103#L5b401925:251]
> at org.apache.geode.test.dunit.VM.invoke(VM.java:405)
> [
> |https://concourse.apachegeode-ci.info/teams/main/pipelines/develop/jobs/DistributedTest/builds/103#L5b401925:252]
> at org.apache.geode.test.dunit.VM.invoke(VM.java:348)
> [
> |https://concourse.apachegeode-ci.info/teams/main/pipelines/develop/jobs/DistributedTest/builds/103#L5b401925:253]
> at
> org.apache.geode.test.dunit.rules.MemberVM.waitTilLocatorFullyReconnected(MemberVM.java:113)
> [
> |https://concourse.apachegeode-ci.info/teams/main/pipelines/develop/jobs/DistributedTest/builds/103#L5b401925:254]
> at
> org.apache.geode.management.JMXMBeanReconnectDUnitTest.testRemoteBeanKnowledge_MaintainServerAndCrashLocator(JMXMBeanReconnectDUnitTest.java:161)
> [
> |https://concourse.apachegeode-ci.info/teams/main/pipelines/develop/jobs/DistributedTest/builds/103#L5b401925:255]
>
> [
> |https://concourse.apachegeode-ci.info/teams/main/pipelines/develop/jobs/DistributedTest/builds/103#L5b401925:256]
> Caused by:
> [
> |https://concourse.apachegeode-ci.info/teams/main/pipelines/develop/jobs/DistributedTest/builds/103#L5b401925:257]
> org.awaitility.core.ConditionTimeoutException: Condition with
> org.apache.geode.test.dunit.rules.MemberVM was not fulfilled within 30
> seconds.
>
> org.apache.geode.management.JMXMBeanReconnectDUnitTest >
> testLocalBeans_MaintainServerAndCrashLocator FAILED
> [
> |https://concourse.apachegeode-ci.info/teams/main/pipelines/develop/jobs/DistributedTest/builds/103#L5b401925:260]
> org.apache.geode.test.dunit.RMIException: While invoking
> org.apache.geode.test.dunit.rules.MemberVM$$Lambda$73/2140274979.run in VM 0
> running on Host 640ab3da6905 with 4 VMs
> [
> |https://concourse.apachegeode-ci.info/teams/main/pipelines/develop/jobs/DistributedTest/builds/103#L5b401925:261]
> at org.apache.geode.test.dunit.VM.invoke(VM.java:436)
> [
> |https://concourse.apachegeode-ci.info/teams/main/pipelines/develop/jobs/DistributedTest/builds/103#L5b401925:262]
> at org.apache.geode.test.dunit.VM.invoke(VM.java:405)
> [
> |https://concourse.apachegeode-ci.info/teams/main/pipelines/develop/jobs/DistributedTest/builds/103#L5b401925:263]
> at org.apache.geode.test.dunit.VM.invoke(VM.java:348)
> [
> |https://concourse.apachegeode-ci.info/teams/main/pipelines/develop/jobs/DistributedTest/builds/103#L5b401925:264]
> at
> org.apache.geode.test.dunit.rules.MemberVM.waitTilLocatorFullyReconnected(MemberVM.java:113)
> [
> |https://concourse.apachegeode-ci.info/teams/main/pipelines/develop/jobs/DistributedTest/builds/103#L5b401925:265]
> at
> org.apache.geode.management.JMXMBeanReconnectDUnitTest.testLocalBeans_MaintainServerAndCrashLocator(JMXMBeanReconnectDUnitTest.java:112)
>
> Caused by:
> [
> |https://concourse.apachegeode-ci.info/teams/main/pipelines/develop/jobs/DistributedTest/builds/103#L5b401925:268]
> org.awaitility.core.ConditionTimeoutException: Condition with
> org.apache.geode.test.dunit.rules.MemberVM was not fulfilled within 30
> seconds.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)