Skip to content

Conversation

@jdeppe-pivotal
Copy link
Contributor

  • This test was strangely flaky and seemed to be suffering from some
    kind of cross-test pollution when multiple tests were running in
    parallel. When stopping and restarting VMs it seems imperative to
    always reuse the same ports.

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?

- This test was strangely flaky and seemed to be suffering from some
  kind of cross-test pollution when multiple tests were running in
  parallel. When stopping and restarting VMs it seems imperative to
  always reuse the same ports.
@jdeppe-pivotal jdeppe-pivotal added the redis Issues related to the geode-for-redis module label Oct 18, 2021
@jdeppe-pivotal jdeppe-pivotal merged commit 3860c2f into apache:develop Oct 18, 2021
@demery-pivotal
Copy link
Contributor

Here's the cause:

  1. Start a member using port 0, which binds any available port from the ephemeral port range.
  2. Stop the member, which releases the port.
  3. Some other process on the machine binds to port 0, and the system randomly selects the port that the member just released.
  4. Start the member on its original port, which fails because another process has bound to it.

It is risky to assume that a port allocated from the ephemeral port range remains free after it is released, as this test was doing. It is even more risky to make that assumption in CI, where dozens of other processes may be using the same port namespace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

redis Issues related to the geode-for-redis module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants