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 BCC9C182A2 for ; Tue, 22 Dec 2015 19:26:19 +0000 (UTC) Received: (qmail 16836 invoked by uid 500); 22 Dec 2015 19:26:19 -0000 Delivered-To: apmail-geode-commits-archive@geode.apache.org Received: (qmail 16802 invoked by uid 500); 22 Dec 2015 19:26:19 -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 16793 invoked by uid 99); 22 Dec 2015 19:26:19 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Dec 2015 19:26:19 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 1E766C1241 for ; Tue, 22 Dec 2015 19:26:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.78 X-Spam-Level: * X-Spam-Status: No, score=1.78 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 9xRFQDd7r3Q6 for ; Tue, 22 Dec 2015 19:26:09 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id 3CDB02304A for ; Tue, 22 Dec 2015 19:26:04 +0000 (UTC) Received: (qmail 14190 invoked by uid 99); 22 Dec 2015 19:26:04 -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, 22 Dec 2015 19:26:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0496DE0593; Tue, 22 Dec 2015 19:26:04 +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, 22 Dec 2015 19:26:33 -0000 Message-Id: In-Reply-To: <532cd8bef94c49f394c821cac73c8df8@git.apache.org> References: <532cd8bef94c49f394c821cac73c8df8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [31/35] incubator-geode git commit: GEODE-299 GEODE-299 when shutdown distributed system, Wait until cache is closed. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/adacdd72 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/adacdd72 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/adacdd72 Branch: refs/heads/feature/GEODE-217 Commit: adacdd72ed96b4fdaa8d4d78b924e2648b66865f Parents: 26ce9a4 Author: zhouxh Authored: Mon Dec 21 11:45:17 2015 -0800 Committer: zhouxh Committed: Mon Dec 21 11:49:58 2015 -0800 ---------------------------------------------------------------------- .../partitioned/PersistentPartitionedRegionDUnitTest.java | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/adacdd72/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java index 39ffb11..d043df8 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java @@ -16,6 +16,8 @@ */ package com.gemstone.gemfire.internal.cache.partitioned; +import static com.jayway.awaitility.Awaitility.await; +import static java.util.concurrent.TimeUnit.SECONDS; import java.io.DataInput; import java.io.DataOutput; import java.io.File; @@ -1439,7 +1441,11 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR public void beforeSendMessage(DistributionManager dm, DistributionMessage msg) { if(msg instanceof ManageBucketReplyMessage) { + Cache cache = getCache(); DistributedTestCase.disconnectFromDS(); + + await().atMost(30, SECONDS).until(() -> {return (cache == null || cache.isClosed());}); + getLogWriter().info("Cache is confirmed closed"); } } });