Return-Path: X-Original-To: apmail-hadoop-common-commits-archive@www.apache.org Delivered-To: apmail-hadoop-common-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BF1AC10C39 for ; Sat, 26 Oct 2013 04:38:44 +0000 (UTC) Received: (qmail 46688 invoked by uid 500); 26 Oct 2013 04:38:36 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 46485 invoked by uid 500); 26 Oct 2013 04:38:29 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 46478 invoked by uid 99); 26 Oct 2013 04:38:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Oct 2013 04:38:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Oct 2013 04:38:25 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 12DEB2388868; Sat, 26 Oct 2013 04:38:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1535920 - in /hadoop/common/branches/branch-2.2/hadoop-common-project: hadoop-common/CHANGES.txt hadoop-nfs/src/test/java/org/apache/hadoop/nfs/TestNfsExports.java Date: Sat, 26 Oct 2013 04:38:04 -0000 To: common-commits@hadoop.apache.org From: cnauroth@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131026043805.12DEB2388868@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cnauroth Date: Sat Oct 26 04:38:04 2013 New Revision: 1535920 URL: http://svn.apache.org/r1535920 Log: HADOOP-10072. Merging change r1535919 from branch-2 to branch-2.2 Modified: hadoop/common/branches/branch-2.2/hadoop-common-project/hadoop-common/CHANGES.txt hadoop/common/branches/branch-2.2/hadoop-common-project/hadoop-nfs/src/test/java/org/apache/hadoop/nfs/TestNfsExports.java Modified: hadoop/common/branches/branch-2.2/hadoop-common-project/hadoop-common/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.2/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1535920&r1=1535919&r2=1535920&view=diff ============================================================================== --- hadoop/common/branches/branch-2.2/hadoop-common-project/hadoop-common/CHANGES.txt (original) +++ hadoop/common/branches/branch-2.2/hadoop-common-project/hadoop-common/CHANGES.txt Sat Oct 26 04:38:04 2013 @@ -35,6 +35,9 @@ Release 2.2.1 - UNRELEASED HADOOP-10052. Temporarily disable client-side symlink resolution (branch-2.2 only change). (wang) + HADOOP-10072. TestNfsExports#testMultiMatchers fails due to non-deterministic + timing around cache expiry check. (cnauroth) + Release 2.2.0 - 2013-10-13 INCOMPATIBLE CHANGES Modified: hadoop/common/branches/branch-2.2/hadoop-common-project/hadoop-nfs/src/test/java/org/apache/hadoop/nfs/TestNfsExports.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.2/hadoop-common-project/hadoop-nfs/src/test/java/org/apache/hadoop/nfs/TestNfsExports.java?rev=1535920&r1=1535919&r2=1535920&view=diff ============================================================================== --- hadoop/common/branches/branch-2.2/hadoop-common-project/hadoop-nfs/src/test/java/org/apache/hadoop/nfs/TestNfsExports.java (original) +++ hadoop/common/branches/branch-2.2/hadoop-common-project/hadoop-nfs/src/test/java/org/apache/hadoop/nfs/TestNfsExports.java Sat Oct 26 04:38:04 2013 @@ -35,6 +35,7 @@ public class TestNfsExports { Nfs3Constant.EXPORTS_CACHE_EXPIRYTIME_MILLIS_DEFAULT * 1000 * 1000; private static final int CacheSize = Nfs3Constant.EXPORTS_CACHE_SIZE_DEFAULT; + private static final long NanosPerMillis = 1000000; @Test public void testWildcardRW() { @@ -185,7 +186,15 @@ public class TestNfsExports { Thread.sleep(1000); // no cache for address2 now - Assert.assertEquals(AccessPrivilege.NONE, - matcher.getAccessPrivilege(address2, address2)); + AccessPrivilege ap; + long startNanos = System.nanoTime(); + do { + ap = matcher.getAccessPrivilege(address2, address2); + if (ap == AccessPrivilege.NONE) { + break; + } + Thread.sleep(500); + } while ((System.nanoTime() - startNanos) / NanosPerMillis < 5000); + Assert.assertEquals(AccessPrivilege.NONE, ap); } }