You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by "dhemery (GitHub)" <gi...@apache.org> on 2018/10/09 16:03:35 UTC
[GitHub] [geode] dhemery opened pull request #2583: GEODE-5501: Wait
for listener to disconnect
In several tests, a listener calls disconnectFromDS() to disconnect its member when a certain event occurs.
The tests do not wait for the listener to finish disconnecting.
When the tests end, the cleanup also calls `disconnectFromDS()` to disconnect the same member.
Within `disconnectFromDS()`, `InternalDistributedSystem.disconnect()` is called twice, once on the system the test framework knows about, and once on whatever system `InternalDistributedSystem.getConnectedInstance()` returns.
If two calls to `disconnect()` are in progress at the same time, one blocks until the other finishes.
If the test ends before the listener finishes, the listener appears to wait until a later test reuses the same VM, at which time it disconnects whatever system it finds there. We do not know why it waits. We suspect that multiple calls to `disconnect()` (from the listener and from the framework's normal cleanup routine) are interacting in some way.
The later test fails if the listener's second call to `disconnect()` occurs after the test has started a member in the same VM.
To prevent the problem, we:
* Wait for the listener to finish before ending the test.
* Remove the listener at the end of the test, so that it does not
respond to events in later tests.
Signed-Off-By: Helena Bales <hb...@pivotal.io>
Thank you for submitting a contribution to Apache Geode.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
### For all changes:
- [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
- [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?
- [ ] Is your initial contribution a single, squashed commit?
- [ ] Does `gradlew build` run cleanly?
- [ ] Have you written or updated unit tests to verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
### Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to dev@geode.apache.org.
[ Full content available at: https://github.com/apache/geode/pull/2583 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org
[GitHub] [geode] dhemery commented on issue #2583: GEODE-5501: Wait
for listener to disconnect
Posted by "dhemery (GitHub)" <gi...@apache.org>.
Rebased to pick up GeodeAwaitility.
[ Full content available at: https://github.com/apache/geode/pull/2583 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org
[GitHub] [geode] upthewaterspout commented on pull request #2583:
GEODE-5501: Wait for listener to disconnect
Posted by "upthewaterspout (GitHub)" <gi...@apache.org>.
Can we make this an Awaitility call?
[ Full content available at: https://github.com/apache/geode/pull/2583 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org
[GitHub] [geode] upthewaterspout commented on pull request #2583:
GEODE-5501: Wait for listener to disconnect
Posted by "upthewaterspout (GitHub)" <gi...@apache.org>.
Do we need to make assertions about the test method name here?
[ Full content available at: https://github.com/apache/geode/pull/2583 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org
[GitHub] [geode] balesh2 closed pull request #2583: GEODE-5501: Wait
for listener to disconnect
Posted by "balesh2 (GitHub)" <gi...@apache.org>.
[ pull request closed by balesh2 ]
[ Full content available at: https://github.com/apache/geode/pull/2583 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org
[GitHub] [geode] dhemery commented on issue #2583: GEODE-5501: Wait
for listener to disconnect
Posted by "dhemery (GitHub)" <gi...@apache.org>.
The failures in the DistributedTest run (https://concourse.apachegeode-ci.info/builds/3683) are unrelated.
[ Full content available at: https://github.com/apache/geode/pull/2583 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org