Add ability to immediately start ZK testing server in Curator extension #242
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
start the Curator testing server immediately (at construction) instead
of during the JUnit lifecycle (i.e. in beforeAll). These are named
newStartingImmediately and one will start the testing server on a
random port and the other takes a specific port to use.
is available. Otherwise, when Curator's TestingServer attempts to
start, it will never complete. The reason is that TestingServer starts
the server in a new Thread and then blocks (without a timeout) until
connected. We don't want this behavior in a test extension and instead
should fail fast.
separate from tests having only top-level tests
we have to register the CuratorTestingServerExtension with immediate
start explicitly)
Test restructuring:
Split the original CuratorTestingServerExtensionTest test into two
separate tests.
The first, CuratorTestingServerExtensionTest, contains only top-level
tests while the second, CuratorTestingServerExtensionNestedTest,
contains both top-level and nested test classes. These two contain
essentially the exact same tests, to ensure we are agnostic of how a
test is structured. Though as noted in extension's Javadoc, nested test
classes will cause us to use multiple testing servers (due to the way
the JUnit lifecycle works when using nested test classes).
Add CuratorTestingServerExtensionImmediateStartTest to explicitly test
the immediate start feature added in this commit.
Closes #239