Return-Path: X-Original-To: apmail-incubator-accumulo-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-accumulo-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7A3047B82 for ; Wed, 26 Oct 2011 03:42:36 +0000 (UTC) Received: (qmail 27376 invoked by uid 500); 26 Oct 2011 03:42:36 -0000 Delivered-To: apmail-incubator-accumulo-commits-archive@incubator.apache.org Received: (qmail 27343 invoked by uid 500); 26 Oct 2011 03:42:35 -0000 Mailing-List: contact accumulo-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: accumulo-dev@incubator.apache.org Delivered-To: mailing list accumulo-commits@incubator.apache.org Received: (qmail 27336 invoked by uid 99); 26 Oct 2011 03:42:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Oct 2011 03:42:33 +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; Wed, 26 Oct 2011 03:42:32 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 26E1023889D7; Wed, 26 Oct 2011 03:42:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1189014 - /incubator/accumulo/trunk/src/start/src/test/java/org/apache/accumulo/start/Test.java Date: Wed, 26 Oct 2011 03:42:12 -0000 To: accumulo-commits@incubator.apache.org From: vines@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111026034212.26E1023889D7@eris.apache.org> Author: vines Date: Wed Oct 26 03:42:11 2011 New Revision: 1189014 URL: http://svn.apache.org/viewvc?rev=1189014&view=rev Log: Accumulo-64 - Didn't provide support for when no site.xml file was present. We now use the example if not available. This should resolve build problems with jenkins. Modified: incubator/accumulo/trunk/src/start/src/test/java/org/apache/accumulo/start/Test.java Modified: incubator/accumulo/trunk/src/start/src/test/java/org/apache/accumulo/start/Test.java URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/start/src/test/java/org/apache/accumulo/start/Test.java?rev=1189014&r1=1189013&r2=1189014&view=diff ============================================================================== --- incubator/accumulo/trunk/src/start/src/test/java/org/apache/accumulo/start/Test.java (original) +++ incubator/accumulo/trunk/src/start/src/test/java/org/apache/accumulo/start/Test.java Wed Oct 26 03:42:11 2011 @@ -176,19 +176,28 @@ public class Test extends TestCase { String configFile = System.getProperty("org.apache.accumulo.config.file", "accumulo-site.xml"); String SITE_CONF = System.getenv("ACCUMULO_HOME") + "/conf/" + configFile; File oldConf = new File(SITE_CONF); + boolean exists = oldConf.exists(); String siteBkp = SITE_CONF + ".bkp"; - if (oldConf.exists()) + if (exists) { - oldConf.renameTo(new File(siteBkp)); + if (oldConf.exists()) + { + oldConf.renameTo(new File(siteBkp)); + } + oldConf = new File(siteBkp); } - oldConf = new File(siteBkp); String randomFolder = System.getenv("ACCUMULO_HOME") + "/lib/notExt" + new Random().nextInt(); - + File rf = new File(randomFolder); + rf.mkdirs(); try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); - Document d = db.parse(siteBkp); + Document d; + if (exists) + d = db.parse(siteBkp); + else + d = db.parse(new File(SITE_CONF+".example")); NodeList pnodes = d.getElementsByTagName("property"); for (int i = pnodes.getLength() - 1; i >= 0; i--) { @@ -218,9 +227,8 @@ public class Test extends TestCase { } finally { new File(SITE_CONF).delete(); - if (oldConf.exists()) + if (exists) oldConf.renameTo(new File(SITE_CONF)); - File rf = new File(randomFolder); for (File deleteMe : rf.listFiles()) deleteMe.delete(); rf.delete();