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 DCDCA10C3C for ; Tue, 9 Jul 2013 19:50:35 +0000 (UTC) Received: (qmail 91739 invoked by uid 500); 9 Jul 2013 19:50:35 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 91697 invoked by uid 500); 9 Jul 2013 19:50:34 -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 91690 invoked by uid 99); 9 Jul 2013 19:50:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jul 2013 19:50:34 +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; Tue, 09 Jul 2013 19:50:31 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id BA11223889F1; Tue, 9 Jul 2013 19:50:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1501497 [2/2] - in /accumulo/trunk: core/src/main/java/org/apache/accumulo/core/cli/ minicluster/src/main/java/org/apache/accumulo/minicluster/ server/src/main/java/org/apache/accumulo/server/tabletserver/ test/src/main/java/org/apache/acc... Date: Tue, 09 Jul 2013 19:50:08 -0000 To: commits@accumulo.apache.org From: ecn@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130709195009.BA11223889F1@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/TableIT.java URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/TableIT.java?rev=1501497&r1=1501496&r2=1501497&view=diff ============================================================================== --- accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/TableIT.java (original) +++ accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/TableIT.java Tue Jul 9 19:50:06 2013 @@ -26,6 +26,7 @@ import org.apache.accumulo.core.cli.Batc import org.apache.accumulo.core.cli.ScannerOpts; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.client.Scanner; +import org.apache.accumulo.core.client.admin.TableOperations; import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.KeyExtent; import org.apache.accumulo.core.data.Value; @@ -45,12 +46,13 @@ public class TableIT extends MacTest { @Test(timeout = 60 * 1000) public void test() throws Exception { Connector c = getConnector(); - c.tableOperations().create("test_ingest"); + TableOperations to = c.tableOperations(); + to.create("test_ingest"); TestIngest.Opts opts = new TestIngest.Opts(); TestIngest.ingest(c, opts, new BatchWriterOpts()); VerifyIngest.Opts vopts = new VerifyIngest.Opts(); VerifyIngest.verifyIngest(c, vopts, new ScannerOpts()); - String id = c.tableOperations().tableIdMap().get("test_ingest"); + String id = to.tableIdMap().get("test_ingest"); Scanner s = c.createScanner(MetadataTable.NAME, Authorizations.EMPTY); s.setRange(new KeyExtent(new Text(id), null, null).toMetadataRange()); int count = 0; @@ -61,7 +63,7 @@ public class TableIT extends MacTest { assertTrue(count > 0); FileSystem fs = FileSystem.get(CachedConfiguration.getInstance()); assertTrue(fs.listStatus(new Path(cluster.getConfig().getDir() + "/accumulo/tables/" + id)).length > 0); - c.tableOperations().delete("test_ingest"); + to.delete("test_ingest"); count = 0; for (@SuppressWarnings("unused") Entry entry : s) { @@ -69,10 +71,11 @@ public class TableIT extends MacTest { } assertEquals(0, count); assertEquals(0, fs.listStatus(new Path(cluster.getConfig().getDir() + "/accumulo/tables/" + id)).length); - assertNull(c.tableOperations().tableIdMap().get("test_ingest")); - c.tableOperations().create("test_ingest"); + assertNull(to.tableIdMap().get("test_ingest")); + to.create("test_ingest"); TestIngest.ingest(c, opts, new BatchWriterOpts()); VerifyIngest.verifyIngest(c, vopts, new ScannerOpts()); + to.delete("test_ingest"); assertEquals(0, cluster.exec(Admin.class, "stopAll").waitFor()); } Modified: accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/TimeoutIT.java URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/TimeoutIT.java?rev=1501497&r1=1501496&r2=1501497&view=diff ============================================================================== --- accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/TimeoutIT.java (original) +++ accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/TimeoutIT.java Tue Jul 9 19:50:06 2013 @@ -66,9 +66,9 @@ public class TimeoutIT extends MacTest { bw.close(); fail("batch writer did not timeout"); } catch (MutationsRejectedException mre) { - if (!(mre.getCause() instanceof TimedOutException)) { - throw mre; - } + if (mre.getCause() instanceof TimedOutException) + return; + throw mre; } } Modified: accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/VisibilityIT.java URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/VisibilityIT.java?rev=1501497&r1=1501496&r2=1501497&view=diff ============================================================================== --- accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/VisibilityIT.java (original) +++ accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/VisibilityIT.java Tue Jul 9 19:50:06 2013 @@ -46,7 +46,7 @@ import org.junit.Test; public class VisibilityIT extends MacTest { - @Test + @Test(timeout=30*1000) public void run() throws Exception { Connector c = getConnector(); c.tableOperations().create("vt"); Added: accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/WriteAheadLogIT.java URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/WriteAheadLogIT.java?rev=1501497&view=auto ============================================================================== --- accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/WriteAheadLogIT.java (added) +++ accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/WriteAheadLogIT.java Tue Jul 9 19:50:06 2013 @@ -0,0 +1,69 @@ +/* + * 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.*; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +import org.apache.accumulo.core.cli.BatchWriterOpts; +import org.apache.accumulo.core.cli.ScannerOpts; +import org.apache.accumulo.core.client.Connector; +import org.apache.accumulo.core.conf.Property; +import org.apache.accumulo.minicluster.MiniAccumuloConfig; +import org.apache.accumulo.minicluster.ProcessReference; +import org.apache.accumulo.minicluster.ServerType; +import org.apache.accumulo.server.util.Admin; +import org.apache.accumulo.test.TestIngest; +import org.apache.accumulo.test.VerifyIngest; +import org.junit.Test; + +public class WriteAheadLogIT extends MacTest { + + @Override + public void configure(MiniAccumuloConfig cfg) { + Map siteConfig = new HashMap(); + siteConfig.put(Property.TSERV_WALOG_MAX_SIZE.getKey(), "2M"); + siteConfig.put(Property.GC_CYCLE_DELAY.getKey(), "1"); + siteConfig.put(Property.GC_CYCLE_START.getKey(), "1"); + siteConfig.put(Property.MASTER_RECOVERY_DELAY.getKey(), "0"); + siteConfig.put(Property.TSERV_MAXMEM.getKey(), "200K"); + siteConfig.put(Property.TSERV_MAJC_DELAY.getKey(), "1"); + } + + @Test(timeout=60*1000) + public void test() throws Exception { + Connector c = getConnector(); + c.tableOperations().create("test_ingest"); + c.tableOperations().setProperty("test_ingest", Property.TABLE_SPLIT_THRESHOLD.getKey(), "750K"); + TestIngest.Opts opts = new TestIngest.Opts(); + TestIngest.ingest(c, opts, new BatchWriterOpts()); + VerifyIngest.Opts vopts = new VerifyIngest.Opts(); + VerifyIngest.verifyIngest(c, vopts, new ScannerOpts()); + Map> processes = cluster.getProcesses(); + for (ProcessReference tserver : processes.get(ServerType.TABLET_SERVER)) { + cluster.killProcess(ServerType.TABLET_SERVER, tserver); + } + assertEquals(0, cluster.getProcesses().get(ServerType.TABLET_SERVER).size()); + cluster.start(); + VerifyIngest.verifyIngest(c, vopts, new ScannerOpts()); + assertEquals(0, cluster.exec(Admin.class, "stopAll").waitFor()); + } + +} Propchange: accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/WriteAheadLogIT.java ------------------------------------------------------------------------------ svn:eol-style = native Added: accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/ZooCacheIT.java URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/ZooCacheIT.java?rev=1501497&view=auto ============================================================================== --- accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/ZooCacheIT.java (added) +++ accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/ZooCacheIT.java Tue Jul 9 19:50:06 2013 @@ -0,0 +1,55 @@ +/* + * 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.*; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.atomic.AtomicReference; + +import org.junit.Test; + +public class ZooCacheIT extends MacTest { + + @Test(timeout=200*1000) + public void test() throws Exception { + assertEquals(0, cluster.exec(CacheTestClean.class, "/zcTest-42", "/tmp/zcTest-42").waitFor()); + final AtomicReference ref = new AtomicReference(); + List threads = new ArrayList(); + for (int i = 0; i < 3; i++) { + Thread reader = new Thread() { + public void run() { + try { + CacheTestReader.main(new String[]{"/zcTest-42", "/tmp/zcTest-42", cluster.getZooKeepers()}); + } catch(Exception ex) { + ref.set(ex); + } + } + }; + reader.start(); + threads.add(reader); + } + assertEquals(0, cluster.exec(CacheTestWriter.class, "/zcTest-42", "/tmp/zcTest-42", "3","500").waitFor()); + for (Thread t: threads) { + t.join(); + if (ref.get() != null) + throw ref.get(); + } + } + +} Propchange: accumulo/trunk/test/src/test/java/org/apache/accumulo/test/functional/ZooCacheIT.java ------------------------------------------------------------------------------ svn:eol-style = native