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 E2B4417F5B for ; Tue, 21 Apr 2015 15:34:59 +0000 (UTC) Received: (qmail 55479 invoked by uid 500); 21 Apr 2015 15:34:59 -0000 Delivered-To: apmail-accumulo-notifications-archive@accumulo.apache.org Received: (qmail 55441 invoked by uid 500); 21 Apr 2015 15:34:59 -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 55423 invoked by uid 99); 21 Apr 2015 15:34:59 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Apr 2015 15:34:59 +0000 Date: Tue, 21 Apr 2015 15:34:59 +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=14505120#comment-14505120 ] ASF GitHub Bot commented on ACCUMULO-3000: ------------------------------------------ Github user joshelser commented on a diff in the pull request: https://github.com/apache/accumulo/pull/29#discussion_r28789943 --- Diff: minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterExistingZooKeepersTest.java --- @@ -0,0 +1,100 @@ +/* + * 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 Logger log = LoggerFactory.getLogger(MiniAccumuloClusterExistingZooKeepersTest.class); + private File baseDir = new File(System.getProperty("user.dir") + "/target/mini-tests/" + this.getClass().getName()); + private TestingServer zooKeeper; + private MiniAccumuloCluster accumulo; + + @Rule + public TestName testName = new TestName(); + + @Before + public void setupTestCluster() throws Exception { + assertTrue(baseDir.mkdirs() || baseDir.isDirectory()); + File testDir = new File(baseDir, testName.getMethodName()); + FileUtils.deleteQuietly(testDir); + assertTrue(testDir.mkdir()); + + zooKeeper = new TestingServer(); + + MiniAccumuloConfig config = new MiniAccumuloConfig(testDir, "superSecret"); --- End diff -- Would be nice to make `"superSecret"` a static final constant > 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)