Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DBF68200C8B for ; Mon, 22 May 2017 20:29:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DAE58160BE1; Mon, 22 May 2017 18:29:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id EB59E160BE3 for ; Mon, 22 May 2017 20:29:08 +0200 (CEST) Received: (qmail 66143 invoked by uid 500); 22 May 2017 18:29:03 -0000 Mailing-List: contact commits-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list commits@geode.apache.org Received: (qmail 62880 invoked by uid 99); 22 May 2017 18:28:59 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 May 2017 18:28:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 58A47DFA33; Mon, 22 May 2017 18:28:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: udo@apache.org To: commits@geode.apache.org Date: Mon, 22 May 2017 18:30:02 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [66/69] [abbrv] geode git commit: GEODE-2959: add pre-condition assertion to LocatorLauncherTest archived-at: Mon, 22 May 2017 18:29:10 -0000 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-2580 Commit: 64798a583c881988c688cc64524ce027909f8f28 Parents: 97a6e1a Author: Kirk Lund Authored: Fri May 19 16:12:44 2017 -0700 Committer: Kirk Lund 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);