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 93943200B74 for ; Thu, 1 Sep 2016 21:04:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9252E160ACE; Thu, 1 Sep 2016 19:04:24 +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 B6931160AD8 for ; Thu, 1 Sep 2016 21:04:23 +0200 (CEST) Received: (qmail 25226 invoked by uid 500); 1 Sep 2016 19:04:22 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 24934 invoked by uid 99); 1 Sep 2016 19:04:22 -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; Thu, 01 Sep 2016 19:04:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 29E0FE09B3; Thu, 1 Sep 2016 19:04:22 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ctubbsii@apache.org To: commits@accumulo.apache.org Date: Thu, 01 Sep 2016 19:04:32 -0000 Message-Id: <4a552ad95b954adfaaf1be02e7ed3b75@git.apache.org> In-Reply-To: <6d97e0a1cb7b4b91b5ea112a8adfab8d@git.apache.org> References: <6d97e0a1cb7b4b91b5ea112a8adfab8d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [12/28] accumulo git commit: ACCUMULO-4440 Fix JUnit 4.12 deprecation warning archived-at: Thu, 01 Sep 2016 19:04:24 -0000 ACCUMULO-4440 Fix JUnit 4.12 deprecation warning Use TimeUnit-based constructor instead of implicit millis for Timeout rule. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/3bc3c6d5 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/3bc3c6d5 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/3bc3c6d5 Branch: refs/heads/1.8 Commit: 3bc3c6d5e254b5b70947f051597f2c3b6d784a57 Parents: 775dccd Author: Christopher Tubbs Authored: Wed Aug 31 19:12:18 2016 -0400 Committer: Christopher Tubbs Committed: Thu Sep 1 13:13:50 2016 -0400 ---------------------------------------------------------------------- test/src/test/java/org/apache/accumulo/harness/AccumuloIT.java | 3 ++- .../org/apache/accumulo/test/replication/CyclicReplicationIT.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/3bc3c6d5/test/src/test/java/org/apache/accumulo/harness/AccumuloIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/harness/AccumuloIT.java b/test/src/test/java/org/apache/accumulo/harness/AccumuloIT.java index 03ee44c..46426c3 100644 --- a/test/src/test/java/org/apache/accumulo/harness/AccumuloIT.java +++ b/test/src/test/java/org/apache/accumulo/harness/AccumuloIT.java @@ -19,6 +19,7 @@ package org.apache.accumulo.harness; import static org.junit.Assert.assertTrue; import java.io.File; +import java.util.concurrent.TimeUnit; import org.apache.commons.io.FileUtils; import org.junit.Rule; @@ -92,7 +93,7 @@ public class AccumuloIT { } catch (NumberFormatException exception) { log.warn("Could not parse timeout.factor, defaulting to no timeout."); } - return new Timeout(waitLonger * defaultTimeoutSeconds() * 1000); + return new Timeout(waitLonger * defaultTimeoutSeconds(), TimeUnit.SECONDS); } /** http://git-wip-us.apache.org/repos/asf/accumulo/blob/3bc3c6d5/test/src/test/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java b/test/src/test/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java index 25061c9..f6aa89b 100644 --- a/test/src/test/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java +++ b/test/src/test/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Set; +import java.util.concurrent.TimeUnit; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.BatchWriterConfig; @@ -79,7 +80,7 @@ public class CyclicReplicationIT { log.warn("Could not parse timeout.factor, not scaling timeout"); } - return new Timeout(scalingFactor * 5 * 60 * 1000); + return new Timeout(scalingFactor * 5, TimeUnit.MINUTES); } @Rule