You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2013/01/29 17:29:03 UTC
svn commit: r1439985 - in /accumulo/trunk:
core/src/main/java/org/apache/accumulo/core/util/shell/commands/
test/system/auto/ test/system/auto/simple/
Author: ecn
Date: Tue Jan 29 16:29:02 2013
New Revision: 1439985
URL: http://svn.apache.org/viewvc?rev=1439985&view=rev
Log:
ACCUMULO-1004 many fixes to the functional tests for 1.5
Modified:
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddAuthsCommand.java
accumulo/trunk/test/system/auto/TestCombinerX.jar
accumulo/trunk/test/system/auto/TestCombinerY.jar
accumulo/trunk/test/system/auto/simple/combiner.py
accumulo/trunk/test/system/auto/simple/examples.py
accumulo/trunk/test/system/auto/simple/mapreduce.py
accumulo/trunk/test/system/auto/simple/mergeMetadata.py
accumulo/trunk/test/system/auto/simple/shell.py
accumulo/trunk/test/system/auto/simple/split.py
Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddAuthsCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddAuthsCommand.java?rev=1439985&r1=1439984&r2=1439985&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddAuthsCommand.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddAuthsCommand.java Tue Jan 29 16:29:02 2013
@@ -40,8 +40,10 @@ public class AddAuthsCommand extends Com
final String scanOpts = cl.getOptionValue(scanOptAuths.getOpt());
Authorizations auths = shellState.getConnector().securityOperations().getUserAuthorizations(user);
StringBuilder userAuths = new StringBuilder();
- userAuths.append(auths.toString());
- userAuths.append(",");
+ if (!auths.isEmpty()) {
+ userAuths.append(auths.toString());
+ userAuths.append(",");
+ }
userAuths.append(scanOpts);
shellState.getConnector().securityOperations().changeUserAuthorizations(user, ScanCommand.parseAuthorizations(userAuths.toString()));
Shell.log.debug("Changed record-level authorizations for user " + user);
Modified: accumulo/trunk/test/system/auto/TestCombinerX.jar
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/TestCombinerX.jar?rev=1439985&r1=1439984&r2=1439985&view=diff
==============================================================================
Binary files - no diff available.
Modified: accumulo/trunk/test/system/auto/TestCombinerY.jar
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/TestCombinerY.jar?rev=1439985&r1=1439984&r2=1439985&view=diff
==============================================================================
Binary files - no diff available.
Modified: accumulo/trunk/test/system/auto/simple/combiner.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/combiner.py?rev=1439985&r1=1439984&r2=1439985&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/combiner.py (original)
+++ accumulo/trunk/test/system/auto/simple/combiner.py Tue Jan 29 16:29:02 2013
@@ -68,10 +68,19 @@ class CombinerTest(TestUtilsMixin, unitt
self.start_accumulo()
self.checkSum()
+jarPath = ACCUMULO_HOME+"/lib/ext/TestCombiner.jar"
+
class ClassLoaderTest(TestUtilsMixin, unittest.TestCase):
"Start a clean accumulo, ingest one data, read it, set a combiner, read it again, change the combiner jar, read it again"
order = 26
+
+ def setUp(self):
+ # make sure the combiner is not there
+ if os.path.exists(jarPath):
+ os.remove(jarPath)
+ TestUtilsMixin.setUp(self)
+
def checkSum(self, val):
# check the scan
out, err, code = self.shell(self.masterHost(), "table test\nscan\n")
@@ -84,10 +93,6 @@ class ClassLoaderTest(TestUtilsMixin, un
self.fail("Unable to find needed output in %r" % out)
def runTest(self):
- jarPath = ACCUMULO_HOME+"/lib/ext/TestCombiner.jar"
- # make sure the combiner is not there
- if os.path.exists(jarPath):
- os.remove(jarPath)
# initialize the database
out, err, code = self.rootShell(self.masterHost(), "createtable test\n")
self.assert_(code == 0)
@@ -99,6 +104,7 @@ class ClassLoaderTest(TestUtilsMixin, un
self.assert_(code == 0)
self.checkSum("Test")
+ log.info("creating jar file")
shutil.copy(sys.path[0]+"/TestCombinerX.jar", jarPath)
time.sleep(1)
out, err, code = self.rootShell(self.masterHost(), "setiter -t test -scan -p 10 -n TestCombiner -class org.apache.accumulo.test.functional.TestCombiner\n"
Modified: accumulo/trunk/test/system/auto/simple/examples.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/examples.py?rev=1439985&r1=1439984&r2=1439985&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/examples.py (original)
+++ accumulo/trunk/test/system/auto/simple/examples.py Tue Jan 29 16:29:02 2013
@@ -58,7 +58,7 @@ class Examples(TestUtilsMixin, unittest.
self.wait(self.runOn('localhost', cmd))
def runTest(self):
- examplesJar = glob.glob(ACCUMULO_HOME+'/lib/examples-simple*.jar')[0]
+ examplesJar = glob.glob(ACCUMULO_HOME+'/lib/accumulo-examples-simple*.jar')[0]
self.comment("Testing MaxMutation constraint")
self.ashell('createtable test_ingest\n'
Modified: accumulo/trunk/test/system/auto/simple/mapreduce.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/mapreduce.py?rev=1439985&r1=1439984&r2=1439985&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/mapreduce.py (original)
+++ accumulo/trunk/test/system/auto/simple/mapreduce.py Tue Jan 29 16:29:02 2013
@@ -65,7 +65,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','examples-simple*[!javadoc|sources].jar'))
+ examples = globa(os.path.join('lib','accumulo-examples-simple*[!javadoc|sources].jar'))
core = globa(os.path.join('lib','accumulo-core*[!javadoc|sources].jar'))
fate = globa(os.path.join('lib','accumulo-fate*[!javadoc|sources].jar'))
start = globa(os.path.join('lib','accumulo-start*[!javadoc|sources].jar'))
Modified: accumulo/trunk/test/system/auto/simple/mergeMetadata.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/mergeMetadata.py?rev=1439985&r1=1439984&r2=1439985&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/mergeMetadata.py (original)
+++ accumulo/trunk/test/system/auto/simple/mergeMetadata.py Tue Jan 29 16:29:02 2013
@@ -41,6 +41,7 @@ createtable a3
createtable a4
createtable a5
merge -t !METADATA
+yes
sleep 2
scan -np -t !METADATA
''')
Modified: accumulo/trunk/test/system/auto/simple/shell.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/shell.py?rev=1439985&r1=1439984&r2=1439985&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/shell.py (original)
+++ accumulo/trunk/test/system/auto/simple/shell.py Tue Jan 29 16:29:02 2013
@@ -459,7 +459,7 @@ class ShellTest(TestUtilsMixin,unittest.
"whoami command did not return the correct values")
def getauthsTest(self):
passwd = 'secret'
- input = "createuser test_user -s 12,3,4\n%s\n%s\n" % (passwd, passwd)
+ input = "createuser test_user\n%s\n%s\nsetauths -u test_user -s 12,3,4\n" % (passwd, passwd)
out, err, code = self.rootShell(self.masterHost(), input)
self.processResult(out, err, code)
input = "getauths -u test_user\n"
Modified: accumulo/trunk/test/system/auto/simple/split.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/split.py?rev=1439985&r1=1439984&r2=1439985&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/split.py (original)
+++ accumulo/trunk/test/system/auto/simple/split.py Tue Jan 29 16:29:02 2013
@@ -55,7 +55,7 @@ class TabletShouldSplit(SunnyDayTest):
120)
# get the metadata
- out, err, code = self.shell(self.masterHost(), 'table !METADATA\nscan\n')
+ out, err, code = self.shell(self.masterHost(), 'table !METADATA\nscan -np\n')
self.assert_(code == 0)
lines = []
tableID = self.getTableId('test_ingest')