Return-Path: X-Original-To: apmail-accumulo-notifications-archive@minotaur.apache.org Delivered-To: apmail-accumulo-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AC280183DF for ; Fri, 15 May 2015 18:36:05 +0000 (UTC) Received: (qmail 17022 invoked by uid 500); 15 May 2015 18:36:01 -0000 Delivered-To: apmail-accumulo-notifications-archive@accumulo.apache.org Received: (qmail 16990 invoked by uid 500); 15 May 2015 18:36:01 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 16889 invoked by uid 99); 15 May 2015 18:36:01 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 May 2015 18:36:01 +0000 Date: Fri, 15 May 2015 18:36:01 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: notifications@accumulo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ACCUMULO-3000) Allow use of existing ZK service in MiniAccumuloCluster MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ACCUMULO-3000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14545958#comment-14545958 ] ASF GitHub Bot commented on ACCUMULO-3000: ------------------------------------------ Github user ctubbsii commented on a diff in the pull request: https://github.com/apache/accumulo/pull/29#discussion_r30433933 --- Diff: minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterExistingZooKeepersTest.java --- @@ -0,0 +1,91 @@ +/* + * 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.minicluster; + +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.io.IOException; + +import org.apache.accumulo.core.client.Connector; +import org.apache.commons.io.FileUtils; +import org.apache.curator.test.TestingServer; +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TestName; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class MiniAccumuloClusterExistingZooKeepersTest { + private static final File BASE_DIR = new File(System.getProperty("user.dir") + "/target/mini-tests/" + + MiniAccumuloClusterExistingZooKeepersTest.class.getName()); + + private static final String SECRET = "superSecret"; + + private static final Logger log = LoggerFactory.getLogger(MiniAccumuloClusterExistingZooKeepersTest.class); + private TestingServer zooKeeper; + private MiniAccumuloCluster accumulo; + + @Rule + public TestName testName = new TestName(); + + @Before + public void setupTestCluster() throws Exception { + assertTrue(BASE_DIR.mkdirs() || BASE_DIR.isDirectory()); + File testDir = new File(BASE_DIR, testName.getMethodName()); + FileUtils.deleteQuietly(testDir); + assertTrue(testDir.mkdir()); + + zooKeeper = new TestingServer(); --- End diff -- LGTM! Thanks for the addition! > Allow use of existing ZK service in MiniAccumuloCluster > ------------------------------------------------------- > > Key: ACCUMULO-3000 > URL: https://issues.apache.org/jira/browse/ACCUMULO-3000 > Project: Accumulo > Issue Type: Improvement > Components: mini > Affects Versions: 1.5.1, 1.6.0 > Reporter: Josh Elser > Assignee: Trent Nadeau > Priority: Minor > Labels: newbie > Fix For: 1.8.0 > > > A test harness may have already started ZooKeeper for other testing. MiniAccumuloCluster could use that same ZooKepeer instance, instead of creating its own, but it is currently not possible given what MAC does now. -- This message was sent by Atlassian JIRA (v6.3.4#6332)