Return-Path: X-Original-To: apmail-geode-commits-archive@minotaur.apache.org Delivered-To: apmail-geode-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DCD9218A12 for ; Tue, 19 Jan 2016 21:27:30 +0000 (UTC) Received: (qmail 27027 invoked by uid 500); 19 Jan 2016 21:27:30 -0000 Delivered-To: apmail-geode-commits-archive@geode.apache.org Received: (qmail 26999 invoked by uid 500); 19 Jan 2016 21:27:30 -0000 Mailing-List: contact commits-help@geode.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.incubator.apache.org Delivered-To: mailing list commits@geode.incubator.apache.org Received: (qmail 26988 invoked by uid 99); 19 Jan 2016 21:27:30 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jan 2016 21:27:30 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 1909D1803EA for ; Tue, 19 Jan 2016 21:27:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.247 X-Spam-Level: * X-Spam-Status: No, score=1.247 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.554, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id K-TK7m5EsQNM for ; Tue, 19 Jan 2016 21:27:22 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id 59DF131B13 for ; Tue, 19 Jan 2016 21:27:16 +0000 (UTC) Received: (qmail 19890 invoked by uid 99); 19 Jan 2016 21:27:14 -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; Tue, 19 Jan 2016 21:27:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 59581E3868; Tue, 19 Jan 2016 21:27:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: klund@apache.org To: commits@geode.incubator.apache.org Date: Tue, 19 Jan 2016 21:27:36 -0000 Message-Id: <4351cdda7b194ff48f647ff7afca4bce@git.apache.org> In-Reply-To: <2ea4be65aa744f349a9a2a0662852d9c@git.apache.org> References: <2ea4be65aa744f349a9a2a0662852d9c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [24/51] [abbrv] incubator-geode git commit: fixing CI failure fixing CI failure This test periodically failed to find 2 live servers due to an assumption in the test that Pool.borrowConnection() would never find the initial connection created by the pool in prefillConnections(). That caused it to only be connected to one of the three servers instead of the expected two. The fix is to explicitely ask for a connection to the second server. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/dfb3306c Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/dfb3306c Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/dfb3306c Branch: refs/heads/feature/GEODE-217 Commit: dfb3306c527673548858e77fb3b1049e3b1df186 Parents: 61a16b1 Author: Bruce Schuchardt Authored: Wed Jan 6 15:10:51 2016 -0800 Committer: Bruce Schuchardt Committed: Wed Jan 6 15:10:51 2016 -0800 ---------------------------------------------------------------------- .../internal/cache/tier/sockets/CacheServerTestUtil.java | 2 ++ .../tier/sockets/HAStartupAndFailoverDUnitTest.java | 11 +++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfb3306c/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTestUtil.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTestUtil.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTestUtil.java index 18b7d39..123a275 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTestUtil.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTestUtil.java @@ -516,6 +516,7 @@ public class CacheServerTestUtil extends DistributedTestCase */ public static void disableShufflingOfEndpoints() { + // TODO DISABLE_RANDOM doesn't seem to be used anywhere System.setProperty("gemfire.PoolImpl.DISABLE_RANDOM", "true"); System.setProperty("gemfire.bridge.disableShufflingOfEndpoints", "true"); } @@ -525,6 +526,7 @@ public class CacheServerTestUtil extends DistributedTestCase */ public static void enableShufflingOfEndpoints() { + // TODO DISABLE_RANDOM doesn't seem to be used anywhere System.setProperty("gemfire.PoolImpl.DISABLE_RANDOM", "false"); System.setProperty("gemfire.bridge.disableShufflingOfEndpoints", "false"); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfb3306c/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java index 1d9f08d..9a00680 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java @@ -281,7 +281,7 @@ public class HAStartupAndFailoverDUnitTest extends DistributedTestCase verifyDeadAndLiveServers(2,1); server3.invoke(HAStartupAndFailoverDUnitTest.class, "verifyDispatcherIsAlive"); } - + /** * Tests failover initialization by cache operation Threads on secondary */ @@ -652,10 +652,13 @@ public class HAStartupAndFailoverDUnitTest extends DistributedTestCase cache.createRegion(REGION_NAME, attrs); pool = p; - conn = pool.acquireConnection(); - assertNotNull(conn); - + // since the default minConnections is 1 we currently have a connection to + // server1 (vm_0). Now we create a connection to server2 (vm_1) + conn = pool.acquireConnection(new ServerLocation(Host.getHost(0).getHostName(), PORT2)); + // assert that the conn is to server2 since the tests assume that this is so + assertNotNull(conn); + assertTrue(conn.getEndpoint().getLocation().getPort() == PORT2); } public static void createClientCacheWithIncorrectPrimary(String testName, String host) throws Exception