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 7EE159DE2 for ; Mon, 5 Nov 2012 01:18:57 +0000 (UTC) Received: (qmail 47782 invoked by uid 500); 5 Nov 2012 01:18:57 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 47749 invoked by uid 500); 5 Nov 2012 01:18:57 -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 47742 invoked by uid 99); 5 Nov 2012 01:18:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2012 01:18:57 +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; Mon, 05 Nov 2012 01:18:53 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 32DAB23888E3 for ; Mon, 5 Nov 2012 01:18:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1405686 - /accumulo/trunk/test/system/bench/lib/TableSplitsBenchmark.py Date: Mon, 05 Nov 2012 01:18:32 -0000 To: commits@accumulo.apache.org From: elserj@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121105011832.32DAB23888E3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: elserj Date: Mon Nov 5 01:18:31 2012 New Revision: 1405686 URL: http://svn.apache.org/viewvc?rev=1405686&view=rev Log: ACCUMULO-827 Make CloudStone5 clean up after itself properly Modified: accumulo/trunk/test/system/bench/lib/TableSplitsBenchmark.py Modified: accumulo/trunk/test/system/bench/lib/TableSplitsBenchmark.py URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/bench/lib/TableSplitsBenchmark.py?rev=1405686&r1=1405685&r2=1405686&view=diff ============================================================================== --- accumulo/trunk/test/system/bench/lib/TableSplitsBenchmark.py (original) +++ accumulo/trunk/test/system/bench/lib/TableSplitsBenchmark.py Mon Nov 5 01:18:31 2012 @@ -35,35 +35,31 @@ class TableSplitsBenchmark(Benchmark): tablename = 'test_splits' def setUp(self): - random.jumpahead(int(time.time())) - num = random.randint(1, 100000) - self.tablename = self.tablename + "_" + str(num) # Need to generate a splits file for each speed - #code, out, err = cloudshell.run(self.username, self.password, 'table %s\n' % self.tablename) - #if out.find('no such table') == -1: - # log.debug('Deleting table %s' % self.tablename) - # code, out, err = cloudshell.run('user %s\n%s\ndeletetable %s\n' % (self.user, - # self.password, - # self.tablename)) - # self.sleep(5) + code, out, err = cloudshell.run(self.username, self.password, 'table %s\n' % self.tablename) + if out.find('does not exist') == -1: + log.debug('Deleting table %s' % self.tablename) + code, out, err = cloudshell.run(self.username, self.password, 'deletetable %s -f\n' % self.tablename) + self.assertEqual(code, 0, "Could not delete table") Benchmark.setUp(self) def runTest(self): command = 'createtable %s -sf %s\n' % (self.tablename, self.splitsfile) log.debug("Running Command %r", command) code, out, err = cloudshell.run(self.username, self.password, command) + self.assertEqual(code, 0, 'Could not create table: %s' % out) return code, out, err def shortDescription(self): return 'Creates a table with splits. Lower score is better.' def tearDown(self): + command = 'deletetable %s -f\n' % self.tablename + log.debug("Running Command %r", command) + code, out, err = cloudshell.run(self.username, self.password, command) + self.assertEqual(code, 0, "Could not delete table") + log.debug("Process finished") Benchmark.tearDown(self) - # self.sleep(5) - # command = 'deletetable test_splits\n' - # log.debug("Running Command %r", command) - # code, out, err = cloudshell.run(self.username, self.password, command) - # log.debug("Process finished") def setSpeed(self, speed): dir = os.path.dirname(os.path.realpath(__file__))