Repository: geode Updated Branches: refs/heads/feature/GEODE-2632-16 b6527b31c -> c6c2f5c05 (forced update)
GEODE-2959: add pre-condition assertion to LocatorLauncherTest * If this assertion fails then that means some other test that ran previously to this one created and left a DistributedSystem instance in existence. That other test needs to be found and it requires a tearDown to close and null out that DS instance. Project: http://git-wip-us.apache.org/repos/asf/geode/repo Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/64798a58 Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/64798a58 Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/64798a58 Branch: refs/heads/feature/GEODE-2632-16 Commit: 64798a583c881988c688cc64524ce027909f8f28 Parents: 97a6e1a Author: Kirk Lund <kl...@apache.org> Authored: Fri May 19 16:12:44 2017 -0700 Committer: Kirk Lund <kl...@apache.org> Committed: Fri May 19 16:12:44 2017 -0700 ---------------------------------------------------------------------- .../org/apache/geode/distributed/LocatorLauncherTest.java | 7 +++++++ 1 file changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/geode/blob/64798a58/geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherTest.java b/geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherTest.java index 0281a37..d63da87 100644 --- a/geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherTest.java +++ b/geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherTest.java @@ -27,10 +27,12 @@ import static org.mockito.Mockito.when; import org.apache.geode.distributed.LocatorLauncher.Builder; import org.apache.geode.distributed.LocatorLauncher.Command; import org.apache.geode.distributed.internal.DistributionConfig; +import org.apache.geode.distributed.internal.InternalDistributedSystem; import org.apache.geode.distributed.internal.InternalLocator; import org.apache.geode.internal.i18n.LocalizedStrings; import org.apache.geode.test.junit.categories.FlakyTest; import org.apache.geode.test.junit.categories.UnitTest; +import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.contrib.java.lang.system.RestoreSystemProperties; @@ -61,6 +63,11 @@ public class LocatorLauncherTest { @Rule public final TestName testName = new TestName(); + @Before + public void setUp() throws Exception { + assertThat(InternalDistributedSystem.getConnectedInstance()).isNull(); + } + @Test public void shouldBeMockable() throws Exception { LocatorLauncher mockLocatorLauncher = mock(LocatorLauncher.class);