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 1FF7D200CC1 for ; Mon, 10 Jul 2017 20:15:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1E6181650EE; Mon, 10 Jul 2017 18:15:46 +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 65CDF1650E5 for ; Mon, 10 Jul 2017 20:15:45 +0200 (CEST) Received: (qmail 12824 invoked by uid 500); 10 Jul 2017 18:15:44 -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 12815 invoked by uid 99); 10 Jul 2017 18:15:44 -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; Mon, 10 Jul 2017 18:15:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E4289DFF8A; Mon, 10 Jul 2017 18:15:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mmiller@apache.org To: commits@accumulo.apache.org Message-Id: <3ec2947bb86e4b18a84e5b31fa30bc61@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: accumulo git commit: ACCUMULO-4602 Improvements to AssignmentThreadsIT Date: Mon, 10 Jul 2017 18:15:43 +0000 (UTC) archived-at: Mon, 10 Jul 2017 18:15:46 -0000 Repository: accumulo Updated Branches: refs/heads/1.7 9e7e35842 -> b7d9be095 ACCUMULO-4602 Improvements to AssignmentThreadsIT Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/b7d9be09 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/b7d9be09 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/b7d9be09 Branch: refs/heads/1.7 Commit: b7d9be0954accdf6ac91cd541f4ed9e60e49f04a Parents: 9e7e358 Author: Mike Miller Authored: Mon Jul 10 14:05:54 2017 -0400 Committer: Mike Miller Committed: Mon Jul 10 14:05:54 2017 -0400 ---------------------------------------------------------------------- .../accumulo/test/AssignmentThreadsIT.java | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/b7d9be09/test/src/test/java/org/apache/accumulo/test/AssignmentThreadsIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/AssignmentThreadsIT.java b/test/src/test/java/org/apache/accumulo/test/AssignmentThreadsIT.java index 133cabd..3778de6 100644 --- a/test/src/test/java/org/apache/accumulo/test/AssignmentThreadsIT.java +++ b/test/src/test/java/org/apache/accumulo/test/AssignmentThreadsIT.java @@ -71,23 +71,27 @@ public class AssignmentThreadsIT extends ConfigurableMacIT { c.tableOperations().addSplits(tableName, splits); log.info("Taking table offline"); c.tableOperations().offline(tableName, true); + // time how long it takes to load log.info("Bringing the table online"); - long now = System.currentTimeMillis(); + long now = System.nanoTime(); c.tableOperations().online(tableName, true); - long diff = System.currentTimeMillis() - now; - log.info("Loaded " + splits.size() + " tablets in " + diff + " ms"); + long diff = System.nanoTime() - now; + + log.info("Loaded " + splits.size() + " tablets in " + diff + " ns"); c.instanceOperations().setProperty(Property.TSERV_ASSIGNMENT_MAXCONCURRENT.getKey(), "20"); - now = System.currentTimeMillis(); log.info("Taking table offline, again"); c.tableOperations().offline(tableName, true); // wait >10 seconds for thread pool to update - UtilWaitThread.sleep(Math.max(0, now + 11 * 1000 - System.currentTimeMillis())); - now = System.currentTimeMillis(); + log.info("sleep for {} ms so thread pool can update", 60_000); + UtilWaitThread.sleep(60_000); + log.info("Bringing table back online"); + now = System.nanoTime(); c.tableOperations().online(tableName, true); - long diff2 = System.currentTimeMillis() - now; - log.debug("Loaded " + splits.size() + " tablets in " + diff2 + " ms"); + long diff2 = System.nanoTime() - now; + + log.debug("Loaded " + splits.size() + " tablets in " + diff2 + " ns"); assertTrue(diff2 < diff); }