Skip to content

More test-suite refactoring#4

Merged
asfgit merged 1 commit into
apache:masterfrom
jbertram:hacking_guide
May 28, 2015
Merged

More test-suite refactoring#4
asfgit merged 1 commit into
apache:masterfrom
jbertram:hacking_guide

Conversation

@jbertram
Copy link
Copy Markdown
Contributor

Lots of work on the test-suite in this commit including:

  • Rename ServiceTestBase to ActiveMQTestBase
  • Make AddressSettings fluent
  • Remove unnecessary tearDown() implementations
  • Use ActiveMQTestBase.create_Locator() instead of
    ActiveMQClient.createServerLocator_(..)
  • Use fluent ServerLocator methods
  • Make sure all ActiveMQServers.newActiveMQServer invocations
    are surrounded with addServer() where appropriate
  • Create a few example tests to be references from hacking-guide
  • Update hacking-guide with more info on writing tests

@jbertram
Copy link
Copy Markdown
Contributor Author

I apologize for the size of this commit.

I ran the full test-suite and the only failures were things that were failing previously or things that pass locally.

Lots of work on the test-suite in this commit including:
- Rename ServiceTestBase to ActiveMQTestBase
- Make AddressSettings fluent
- Remove unnecessary tearDown() implementations
- Use ActiveMQTestBase.create*Locator() instead of
  ActiveMQClient.createServerLocator*(..)
- Use fluent ServerLocator methods
- Make sure all ActiveMQServers.newActiveMQServer invocations
  are surrounded with addServer() where appropriate
- Create a few example tests to be references from hacking-guide
- Update hacking-guide with more info on writing tests
- Refactor config creation methods in ActiveMQTestBase
@asfbot
Copy link
Copy Markdown

asfbot commented May 28, 2015

ActiveMQ-Artemis-PR-Build #375 SUCCESS
This pull request looks good

@asfgit asfgit merged commit 328611f into apache:master May 28, 2015
asfgit pushed a commit that referenced this pull request May 28, 2015
@asfbot
Copy link
Copy Markdown

asfbot commented May 28, 2015

ActiveMQ-Artemis-PR-Build #376 SUCCESS
This pull request looks good

@jbertram jbertram deleted the hacking_guide branch June 25, 2015 21:14
jbertram referenced this pull request in jbertram/artemis Oct 21, 2015
Fixes that I want part of the next forked release
mtaylor referenced this pull request in mtaylor/activemq-artemis Aug 11, 2016
ARTEMIS-626 re-use context for LDAP
ghost pushed a commit to dudaerich/activemq-artemis that referenced this pull request Sep 12, 2017
clebertsuconic pushed a commit that referenced this pull request Feb 3, 2023
Configurations employing shared-storage with NFS are susceptible to
split-brain in certain scenarios. For example:

  1) Primary loses network connection to NFS.
  2) Backup activates.
  3) Primary reconnects to NFS.
  4) Split-brain.

In reality this situation is pretty unlikely due to the timing involved,
but the possibility still exists. Currently the file lock held by the
primary broker on the NFS share is essentially worthless in this
situation. This commit adds logic by which the timestamp of the lock
file is updated during activation and then routinely checked during
runtime to ensure consistency. This effectively mitigates split-brain in
this situation (and likely others). Here's how it works now.

  1) Primary loses network connection to NFS.
  2) Backup activates.
  3) Primary reconnects to NFS.
  4) Primary detects that the lock file's timestamp has been updated and
     shuts itself down.

When the primary shuts down in step #4 the Topology on the backup can be
damaged. Protections were added for this via ARTEMIS-2868 but only for
the replicated use-case. This commit applies the protection for
removeMember() so that the Topology remains intact.

There are no tests for these changes as I cannot determine how to
properly simulate this use-case. However, there have never been robust,
automated tests for these kinds of NFS use-cases so this is not a
departure from the norm.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants