accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject svn commit: r1407873 - /accumulo/trunk/test/system/bench/lib/CreateTablesBenchmark.py
Date Sat, 10 Nov 2012 19:24:55 GMT
Author: elserj
Date: Sat Nov 10 19:24:54 2012
New Revision: 1407873

URL: http://svn.apache.org/viewvc?rev=1407873&view=rev
Log:
ACCUMULO-827 Fix up Accumulo table code used by CloudStone6

Modified:
    accumulo/trunk/test/system/bench/lib/CreateTablesBenchmark.py

Modified: accumulo/trunk/test/system/bench/lib/CreateTablesBenchmark.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/bench/lib/CreateTablesBenchmark.py?rev=1407873&r1=1407872&r2=1407873&view=diff
==============================================================================
--- accumulo/trunk/test/system/bench/lib/CreateTablesBenchmark.py (original)
+++ accumulo/trunk/test/system/bench/lib/CreateTablesBenchmark.py Sat Nov 10 19:24:54 2012
@@ -30,20 +30,31 @@ class CreateTablesBenchmark(Benchmark):
     tables = 1000
 
     def setUp(self): 
+        for x in range(1, self.tables):
+            currentTable = 'test_ingest%d' % (x)      
+            log.debug("Checking for table existence: %s" % currentTable)
+            code, out, err = cloudshell.run(self.username, self.password, 'table %s\n' %
currentTable)
+            if out.find('does not exist') == -1:
+                command = 'deletetable -f %s\n' % (currentTable)
+                log.debug("Running Command %r", command)
+                code, out, err = cloudshell.run(self.username, self.password, command)
+                self.assertEqual(code, 0, 'Did not successfully delete table: %s' % currentTable)
         Benchmark.setUp(self)  
-        
+
     def runTest(self):
         for x in range(1, self.tables):
             currentTable = 'test_ingest%d' % (x)      
             command = 'createtable %s\n' % (currentTable)
             log.debug("Running Command %r", command)
             code, out, err = cloudshell.run(self.username, self.password, command)
+            self.assertEqual(code, 0, 'Did not successfully create table: %s' % currentTable)
             # print err
         for x in range(1, self.tables):
             currentTable = 'test_ingest%d' % (x)      
-            command = 'deletetable %s\n' % (currentTable)
+            command = 'deletetable -f %s\n' % (currentTable)
             log.debug("Running Command %r", command)
             code, out, err = cloudshell.run(self.username, self.password, command)
+            self.assertEqual(code, 0, 'Did not successfully delete table: %s' % currentTable)
             # print err
         log.debug("Process finished")
         return code, out, err



Mime
View raw message