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 1A0721861B for ; Fri, 1 Apr 2016 20:07:45 +0000 (UTC) Received: (qmail 17802 invoked by uid 500); 1 Apr 2016 20:07:45 -0000 Delivered-To: apmail-geode-commits-archive@geode.apache.org Received: (qmail 17770 invoked by uid 500); 1 Apr 2016 20:07:45 -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 17761 invoked by uid 99); 1 Apr 2016 20:07:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Apr 2016 20:07:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 453B0C0225 for ; Fri, 1 Apr 2016 20:07:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.221 X-Spam-Level: X-Spam-Status: No, score=-3.221 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id tCF6h0-Rv0ra for ; Fri, 1 Apr 2016 20:07:42 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with SMTP id 2C46F5FB30 for ; Fri, 1 Apr 2016 20:07:42 +0000 (UTC) Received: (qmail 17542 invoked by uid 99); 1 Apr 2016 20:07:41 -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; Fri, 01 Apr 2016 20:07:41 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 28081DFDE3; Fri, 1 Apr 2016 20:07:41 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jensdeppe@apache.org To: commits@geode.incubator.apache.org Date: Fri, 01 Apr 2016 20:07:42 -0000 Message-Id: <202fe77f0f124940ba613adf4e2c5140@git.apache.org> In-Reply-To: <0c3d6f292b394c59b3541b6b465c7883@git.apache.org> References: <0c3d6f292b394c59b3541b6b465c7883@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [02/18] incubator-geode git commit: GEODE-1123: Exclude the locator in StreamingOperationManyDUnitTest GEODE-1123: Exclude the locator in StreamingOperationManyDUnitTest This test was calling getOtherDistributionManagerIds, which included that locator. There seemed to be some race where the test would pass and find 4 but if I added a sleep the test would always fail with 5 members (the 4 VMs and the locator). The test now doesn't use getOtherDistributionManagerIds at all, since it really was just trying to get the list of member ids of the other VMs. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/51acabcb Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/51acabcb Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/51acabcb Branch: refs/heads/feature/GEODE-17-2 Commit: 51acabcbb96b541c90a225864b64af40ec661232 Parents: a1f11c0 Author: Dan Smith Authored: Wed Mar 30 17:54:28 2016 -0700 Committer: Dan Smith Committed: Thu Mar 31 10:04:09 2016 -0700 ---------------------------------------------------------------------- .../StreamingOperationManyDUnitTest.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/51acabcb/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/streaming/StreamingOperationManyDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/streaming/StreamingOperationManyDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/streaming/StreamingOperationManyDUnitTest.java index 91e5e20..a5bba7c 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/streaming/StreamingOperationManyDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/streaming/StreamingOperationManyDUnitTest.java @@ -20,15 +20,20 @@ // package com.gemstone.gemfire.distributed.internal.streaming; +import static com.gemstone.gemfire.test.dunit.Wait.pause; + import java.util.ArrayList; +import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.TimeUnit; import com.gemstone.gemfire.LogWriter; +import com.gemstone.gemfire.distributed.internal.DM; import com.gemstone.gemfire.distributed.internal.DistributionMessage; import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem; import com.gemstone.gemfire.distributed.internal.ReplyException; @@ -39,6 +44,7 @@ import com.gemstone.gemfire.test.dunit.DistributedTestCase; import com.gemstone.gemfire.test.dunit.Host; import com.gemstone.gemfire.test.dunit.SerializableRunnable; import com.gemstone.gemfire.test.dunit.VM; +import com.jayway.awaitility.Awaitility; public class StreamingOperationManyDUnitTest extends DistributedTestCase { @@ -52,21 +58,14 @@ public class StreamingOperationManyDUnitTest extends DistributedTestCase { // ask four other VMs to connect to the distributed system // this will be the data provider Host host = Host.getHost(0); + HashSet otherMemberIds = new HashSet<>(); for (int i = 0; i < 4; i++) { VM vm = host.getVM(i); - vm.invoke(new SerializableRunnable("connect to system") { - public void run() { - assertTrue(getSystem() != null); - } - }); + otherMemberIds.add(vm.invoke(() -> getSystem().getDistributedMember())); } - // get the other member id that connected - // by getting the list of other member ids and - Set setOfIds = getSystem().getDistributionManager().getOtherNormalDistributionManagerIds(); - assertEquals(4, setOfIds.size()); TestStreamingOperationManyProviderNoExceptions streamOp = new TestStreamingOperationManyProviderNoExceptions(getSystem()); - streamOp.getDataFromAll(setOfIds); + streamOp.getDataFromAll(otherMemberIds); assertTrue(streamOp.dataValidated); }