incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1239710 - in /incubator/accumulo/branches/1.4: src/server/src/main/java/org/apache/accumulo/server/test/functional/ test/system/auto/simple/ test/system/bench/lib/
Date Thu, 02 Feb 2012 16:27:52 GMT
Author: ecn
Date: Thu Feb  2 16:27:51 2012
New Revision: 1239710

URL: http://svn.apache.org/viewvc?rev=1239710&view=rev
Log:
ACCUMULO-145: fix functional tests

Modified:
    incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/test/functional/ConstraintTest.java
    incubator/accumulo/branches/1.4/test/system/auto/simple/bulkSplitOptimization.py
    incubator/accumulo/branches/1.4/test/system/auto/simple/combiner.py
    incubator/accumulo/branches/1.4/test/system/auto/simple/examples.py
    incubator/accumulo/branches/1.4/test/system/auto/simple/mapreduce.py
    incubator/accumulo/branches/1.4/test/system/auto/simple/shell.py
    incubator/accumulo/branches/1.4/test/system/bench/lib/RowHashBenchmark.py
    incubator/accumulo/branches/1.4/test/system/bench/lib/TeraSortBenchmark.py

Modified: incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/test/functional/ConstraintTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/test/functional/ConstraintTest.java?rev=1239710&r1=1239709&r2=1239710&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/test/functional/ConstraintTest.java
(original)
+++ incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/test/functional/ConstraintTest.java
Thu Feb  2 16:27:51 2012
@@ -51,8 +51,8 @@ public class ConstraintTest extends Func
   
   @Override
   public List<TableSetup> getTablesToCreate() {
-    Map<String,String> config = parseConfig(Property.TABLE_CONSTRAINT_PREFIX + "1=org.apache.accumulo.examples.constraints.NumericValueConstraint",
-        Property.TABLE_CONSTRAINT_PREFIX + "2=org.apache.accumulo.examples.constraints.AlphaNumKeyConstraint");
+    Map<String,String> config = parseConfig(Property.TABLE_CONSTRAINT_PREFIX + "1=org.apache.accumulo.examples.simple.constraints.NumericValueConstraint",
+        Property.TABLE_CONSTRAINT_PREFIX + "2=org.apache.accumulo.examples.simple.constraints.AlphaNumKeyConstraint");
     return Arrays.asList(new TableSetup("ct", config), new TableSetup("ct2", config), new
TableSetup("ct3", config));
   }
   
@@ -107,7 +107,7 @@ public class ConstraintTest extends Func
       }
       
       for (ConstraintViolationSummary cvs : cvsl) {
-        if (!cvs.constrainClass.equals("org.apache.accumulo.examples.constraints.NumericValueConstraint"))
{
+        if (!cvs.constrainClass.equals("org.apache.accumulo.examples.simple.constraints.NumericValueConstraint"))
{
           throw new Exception("Unexpected constraint class " + cvs.constrainClass);
         }
         
@@ -278,8 +278,8 @@ public class ConstraintTest extends Func
       
       HashMap<String,Integer> expected = new HashMap<String,Integer>();
       
-      expected.put("org.apache.accumulo.examples.constraints.NumericValueConstraint", numericErrors);
-      expected.put("org.apache.accumulo.examples.constraints.AlphaNumKeyConstraint", 1);
+      expected.put("org.apache.accumulo.examples.simple.constraints.NumericValueConstraint",
numericErrors);
+      expected.put("org.apache.accumulo.examples.simple.constraints.AlphaNumKeyConstraint",
1);
       
       for (ConstraintViolationSummary cvs : cvsl) {
         if (expected.get(cvs.constrainClass) != cvs.numberOfViolatingMutations) {

Modified: incubator/accumulo/branches/1.4/test/system/auto/simple/bulkSplitOptimization.py
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/test/system/auto/simple/bulkSplitOptimization.py?rev=1239710&r1=1239709&r2=1239710&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/test/system/auto/simple/bulkSplitOptimization.py (original)
+++ incubator/accumulo/branches/1.4/test/system/auto/simple/bulkSplitOptimization.py Thu Feb
 2 16:27:51 2012
@@ -20,6 +20,7 @@ import unittest
 class BulkSplitOptimizationTest(JavaTest):
     "Bulk Import Split Optimization Test"
 
+    maxRuntime = 200
     order = 21
     testClass="org.apache.accumulo.server.test.functional.BulkSplitOptimizationTest"
 

Modified: incubator/accumulo/branches/1.4/test/system/auto/simple/combiner.py
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/test/system/auto/simple/combiner.py?rev=1239710&r1=1239709&r2=1239710&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/test/system/auto/simple/combiner.py (original)
+++ incubator/accumulo/branches/1.4/test/system/auto/simple/combiner.py Thu Feb  2 16:27:51
2012
@@ -21,7 +21,7 @@ import logging
 import unittest
 import time
 
-from TestUtils import TestUtilsMixin
+from TestUtils import TestUtilsMixin, ACCUMULO_HOME
 
 log = logging.getLogger('test.auto')
 
@@ -48,6 +48,7 @@ class CombinerTest(TestUtilsMixin, unitt
                      "setiter -t test -scan -p 10 -n mycombiner -class org.apache.accumulo.core.iterators.user.SummingCombiner\n"
                      "\n"
                      "cf\n"
+                     "\n"
                      "STRING\n"
                      "deleteiter -t test -n vers -minc -majc -scan\n")
         self.assert_(code == 0)
@@ -83,7 +84,7 @@ class ClassLoaderTest(TestUtilsMixin, un
             self.fail("Unable to find needed output in %r" % out)
 
     def runTest(self):
-        jarPath = os.environ['ACCUMULO_HOME']+"/lib/ext/TestCombiner.jar"
+        jarPath = ACCUMULO_HOME+"/lib/ext/TestCombiner.jar"
         # make sure the combiner is not there
         if os.path.exists(jarPath):
             os.remove(jarPath)

Modified: incubator/accumulo/branches/1.4/test/system/auto/simple/examples.py
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/test/system/auto/simple/examples.py?rev=1239710&r1=1239709&r2=1239710&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/test/system/auto/simple/examples.py (original)
+++ incubator/accumulo/branches/1.4/test/system/auto/simple/examples.py Thu Feb  2 16:27:51
2012
@@ -59,11 +59,11 @@ class Examples(TestUtilsMixin, unittest.
 
     def runTest(self):
         self.ashell('createtable %s\nsetauths -u %s -s A,B\nquit\n' %(table, ROOT))
-        examplesJar = glob.glob(ACCUMULO_HOME+'/lib/accumulo-examples-*.jar')[0]
+        examplesJar = glob.glob(ACCUMULO_HOME+'/lib/examples-simple*.jar')[0]
 
         self.comment("Testing dirlist example (a little)")
         self.comment("  ingesting accumulo source")
-        self.execute(self.accumulo_sh(), 'org.apache.accumulo.examples.dirlist.Ingest',
+        self.execute(self.accumulo_sh(), 'org.apache.accumulo.examples.simple.dirlist.Ingest',
                      INSTANCE_NAME, ZOOKEEPERS, ROOT, ROOT_PASSWORD,
                      'dirTable',
                      'indexTable',
@@ -72,7 +72,7 @@ class Examples(TestUtilsMixin, unittest.
                      100000,
                      ACCUMULO_HOME+"/src")
         self.comment("  searching for a file")
-        handle = self.runOn('localhost', [self.accumulo_sh(), 'org.apache.accumulo.examples.dirlist.QueryUtil',
+        handle = self.runOn('localhost', [self.accumulo_sh(), 'org.apache.accumulo.examples.simple.dirlist.QueryUtil',
                                           INSTANCE_NAME, ZOOKEEPERS, ROOT, ROOT_PASSWORD,
                                           'indexTable', auths, 'Fate.java', '-search'])
         out, err = handle.communicate()

Modified: incubator/accumulo/branches/1.4/test/system/auto/simple/mapreduce.py
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/test/system/auto/simple/mapreduce.py?rev=1239710&r1=1239709&r2=1239710&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/test/system/auto/simple/mapreduce.py (original)
+++ incubator/accumulo/branches/1.4/test/system/auto/simple/mapreduce.py Thu Feb  2 16:27:51
2012
@@ -52,7 +52,7 @@ class MapReduceTest(TestUtilsMixin,unitt
     output_tablename = "mapredf"
     input_cfcq = "cf-HASHTYPE:cq-NOTHASHED"
     output_cfcq = "cf-HASHTYPE:cq-MD5BASE64"
-    example_class_to_run ="org.apache.accumulo.examples.mapreduce.RowHash"
+    example_class_to_run ="org.apache.accumulo.examples.simple.mapreduce.RowHash"
     
     def setUp(self):
         if not os.getenv("ZOOKEEPER_HOME"):
@@ -66,7 +66,7 @@ class MapReduceTest(TestUtilsMixin,unitt
     def runTest(self):
         #These Environment variables are need to run this test it will fail if they are not
in the environment
         thriftjar = globa(os.path.join('lib','libthrift*.jar'))
-        examples = globa(os.path.join('lib','accumulo-examples*[!javadoc|sources].jar'))
+        examples = globa(os.path.join('lib','examples-simple*[!javadoc|sources].jar'))
         core = globa(os.path.join('lib','accumulo-core*[!javadoc|sources].jar'))
         start = globa(os.path.join('lib','accumulo-start*[!javadoc|sources].jar'))
         trace = globa(os.path.join('lib','cloudtrace*[!javadoc|sources].jar'))

Modified: incubator/accumulo/branches/1.4/test/system/auto/simple/shell.py
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/test/system/auto/simple/shell.py?rev=1239710&r1=1239709&r2=1239710&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/test/system/auto/simple/shell.py (original)
+++ incubator/accumulo/branches/1.4/test/system/auto/simple/shell.py Thu Feb  2 16:27:51 2012
@@ -59,25 +59,25 @@ class ShellTest(TestUtilsMixin,unittest.
         
         
     def setIterTest(self):
-        input = 'setiter -t setitertest -n mymax -scan -p 10 -class org.apache.accumulo.core.iterators.user.MaxCombiner\n\ncf\nSTRING\n'
+        input = 'setiter -t setitertest -n mymax -scan -p 10 -class org.apache.accumulo.core.iterators.user.MaxCombiner\n\ncf\n\nSTRING\n'
         out,err,code = self.rootShell(self.masterHost(),input)
         self.failUnless(out.find("TableNotFoundException") >= 0,
                         "Was able to setiter a table that didn't exist")
         input = 'createtable setitertest\n'
         out,err,code = self.rootShell(self.masterHost(),input)
         self.processResult(out, err, code)
-        input = 'setiter -t setitertest -n mymax -scan -p 10 -class org.apache.accumulo.core.iterators.user.MaxCombiner\n\ncf1\nSTRING\n'
+        input = 'setiter -t setitertest -n mymax -scan -p 10 -class org.apache.accumulo.core.iterators.user.MaxCombiner\n\ncf1\n\nSTRING\n'
         out,err,code = self.rootShell(self.masterHost(),input)
         self.processResult(out, err, code)
-        input = 'setiter -t setitertest -n mymax -scan -p 10 -class org.apache.accumulo.core.iterators.user.MinCombiner\n\ncf2\nSTRING\n'
+        input = 'setiter -t setitertest -n mymax -scan -p 10 -class org.apache.accumulo.core.iterators.user.MinCombiner\n\ncf2\n\nSTRING\n'
         out,err,code = self.rootShell(self.masterHost(),input)
         self.failUnless(out.find("IllegalArgumentException") >= 0,
                         "Was able to configure same iter name twice")
-        input = 'setiter -t setitertest -n mymin -scan -p 10 -class org.apache.accumulo.core.iterators.user.MinCombiner\n\ncf2\nSTRING\n'
+        input = 'setiter -t setitertest -n mymin -scan -p 10 -class org.apache.accumulo.core.iterators.user.MinCombiner\n\ncf2\n\nSTRING\n'
         out,err,code = self.rootShell(self.masterHost(),input)
         self.failUnless(out.find("IllegalArgumentException") >= 0,
                         "Was able to configure same priority twice")
-        input = 'setiter -t setitertest -n mymin -scan -p 11 -class org.apache.accumulo.core.iterators.user.MinCombiner\n\ncf2\nSTRING\n'
+        input = 'setiter -t setitertest -n mymin -scan -p 11 -class org.apache.accumulo.core.iterators.user.MinCombiner\n\ncf2\n\nSTRING\n'
         out,err,code = self.rootShell(self.masterHost(),input)
         self.processResult(out, err, code)
         input = 'table setitertest\ninsert row1 cf1 cq 10\ninsert row1 cf1 cq 30\ninsert
row1 cf1 cq 20\ninsert row1 cf2 cq 10\ninsert row1 cf2 cq 30\nscan -np\n'
@@ -122,7 +122,7 @@ class ShellTest(TestUtilsMixin,unittest.
                         "Was able to configure same priority twice")
         
     def aggTest(self):
-        input = 'createtable aggtest\nsetiter -t aggtest -n myagg -scan -p 10 -class org.apache.accumulo.core.iterators.user.SummingCombiner\n\ns\nSTRING\n\nquit\n'
+        input = 'createtable aggtest\nsetiter -t aggtest -n myagg -scan -p 10 -class org.apache.accumulo.core.iterators.user.SummingCombiner\n\ns\n\nSTRING\n\nquit\n'
         out,err,code = self.rootShell(self.masterHost(),input)
         self.processResult(out, err, code)
         input = 'table aggtest\ninsert row1 s c 10\ninsert row1 s c 30\nscan -np\n'

Modified: incubator/accumulo/branches/1.4/test/system/bench/lib/RowHashBenchmark.py
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/test/system/bench/lib/RowHashBenchmark.py?rev=1239710&r1=1239709&r2=1239710&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/test/system/bench/lib/RowHashBenchmark.py (original)
+++ incubator/accumulo/branches/1.4/test/system/bench/lib/RowHashBenchmark.py Thu Feb  2 16:27:51
2012
@@ -60,7 +60,7 @@ class RowHashBenchmark(Benchmark):
         #    code, out, err = cloudshell.run('user root\nsecret\ndeletetable RowHashTest\n')

         #    self.sleep(15)
         code, out, err = cloudshell.run(self.username, self.password, "createtable %s -sf
%s\n" % (self.output_table, file))
-        command = self.buildcommand('org.apache.accumulo.examples.mapreduce.TeraSortIngest',
+        command = self.buildcommand('org.apache.accumulo.examples.simple.mapreduce.TeraSortIngest',
                                     self.numrows(),
                                     self.keysizemin(),
                                     self.keysizemax(),
@@ -93,7 +93,7 @@ class RowHashBenchmark(Benchmark):
         return self.valmax
         
     def runTest(self):   
-        command = self.buildcommand('org.apache.accumulo.examples.mapreduce.RowHash',
+        command = self.buildcommand('org.apache.accumulo.examples.simple.mapreduce.RowHash',
                                     self.getInstance(),
                                     self.getZookeepers(),
                                     self.getUsername(),

Modified: incubator/accumulo/branches/1.4/test/system/bench/lib/TeraSortBenchmark.py
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/test/system/bench/lib/TeraSortBenchmark.py?rev=1239710&r1=1239709&r2=1239710&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/test/system/bench/lib/TeraSortBenchmark.py (original)
+++ incubator/accumulo/branches/1.4/test/system/bench/lib/TeraSortBenchmark.py Thu Feb  2
16:27:51 2012
@@ -72,7 +72,7 @@ class TeraSortBenchmark(Benchmark):
         dir = os.path.dirname(os.path.realpath(__file__))
         file = os.path.join( dir, 'splits' )
         code, out, err = cloudshell.run(self.username, self.password, "createtable %s -sf
%s\n" % (self.tablename, file))
-        command = self.buildcommand('org.apache.accumulo.examples.mapreduce.TeraSortIngest',
+        command = self.buildcommand('org.apache.accumulo.examples.simple.mapreduce.TeraSortIngest',
                                     self.numrows(),
                                     self.keysizemin(),
                                     self.keysizemax(),



Mime
View raw message