Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-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 B03E610514 for ; Tue, 18 Feb 2014 20:01:33 +0000 (UTC) Received: (qmail 89314 invoked by uid 500); 18 Feb 2014 20:01:33 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 89257 invoked by uid 500); 18 Feb 2014 20:01:32 -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 89249 invoked by uid 99); 18 Feb 2014 20:01:32 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Feb 2014 20:01:32 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 4906492A1B0; Tue, 18 Feb 2014 20:01:32 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ecn@apache.org To: commits@accumulo.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: ACCUMULO-2361 integration test should be int src/test/java Date: Tue, 18 Feb 2014 20:01:32 +0000 (UTC) Repository: accumulo Updated Branches: refs/heads/master 3e190398a -> 491346ac1 ACCUMULO-2361 integration test should be int src/test/java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/491346ac Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/491346ac Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/491346ac Branch: refs/heads/master Commit: 491346ac1bc3795f3610d5c16fc209d1421b5a48 Parents: 3e19039 Author: Eric Newton Authored: Tue Feb 18 15:01:51 2014 -0500 Committer: Eric Newton Committed: Tue Feb 18 15:01:51 2014 -0500 ---------------------------------------------------------------------- .../functional/DeleteTableDuringSplitIT.java | 100 ------------------- 1 file changed, 100 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/491346ac/test/src/main/java/org/apache/accumulo/test/functional/DeleteTableDuringSplitIT.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/functional/DeleteTableDuringSplitIT.java b/test/src/main/java/org/apache/accumulo/test/functional/DeleteTableDuringSplitIT.java deleted file mode 100644 index 79cb188..0000000 --- a/test/src/main/java/org/apache/accumulo/test/functional/DeleteTableDuringSplitIT.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.accumulo.test.functional; - -import static org.junit.Assert.assertFalse; - -import java.util.ArrayList; -import java.util.List; -import java.util.SortedSet; -import java.util.TreeSet; -import java.util.concurrent.Future; - -import org.apache.accumulo.core.client.TableNotFoundException; -import org.apache.accumulo.core.util.SimpleThreadPool; -import org.apache.accumulo.fate.util.UtilWaitThread; -import org.apache.hadoop.io.Text; -import org.junit.Test; - -// ACCUMULO-2361 -public class DeleteTableDuringSplitIT extends SimpleMacIT { - - @Test(timeout= 10 * 60 * 1000) - public void test() throws Exception { - String[] tableNames = getTableNames(50); - // make a bunch of tables - for (String tableName : tableNames) { - getConnector().tableOperations().create(tableName); - } - final SortedSet splits = new TreeSet(); - for (byte i = 0; i < 100; i++) { - splits.add(new Text(new byte[] {0, 0, i})); - } - - List> results = new ArrayList>(); - SimpleThreadPool es = new SimpleThreadPool(tableNames.length, "concurrent-api-requests"); - for (String tableName : tableNames) { - final String finalName = tableName; - results.add(es.submit(new Runnable() { - @Override - public void run() { - try { - getConnector().tableOperations().addSplits(finalName, splits); - } catch (TableNotFoundException ex) { - } catch (Exception ex) { - throw new RuntimeException(finalName, ex); - } - } - })); - results.add(es.submit(new Runnable() { - @Override - public void run() { - try { - UtilWaitThread.sleep(500); - getConnector().tableOperations().delete(finalName); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - })); - } - for (Future f : results) { - f.get(); - } -// results.clear(); -// for (String tableName : tableNames) { -// final String finalName = tableName; -// results.add(es.submit(new Runnable() { -// @Override -// public void run() { -// try { -// getConnector().tableOperations().delete(finalName); -// } catch (Exception ex) { -// throw new RuntimeException(ex); -// } -// } -// })); -// } -// for (Future f : results) { -// f.get(); -// } - for (String tableName : tableNames) { - assertFalse(getConnector().tableOperations().exists(tableName)); - } - } - -}