HBASE-7584. Improve TestAccessController.testAppend

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1434091 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Kyle Purtell 2013-01-16 18:27:31 +00:00
parent c264d3f7ea
commit adb7e27eb2
1 changed files with 9 additions and 3 deletions

View File

@ -793,9 +793,15 @@ public class TestAccessController {
PrivilegedExceptionAction appendAction = new PrivilegedExceptionAction() { PrivilegedExceptionAction appendAction = new PrivilegedExceptionAction() {
public Object run() throws Exception { public Object run() throws Exception {
Append append = new Append(TEST_TABLE); byte[] row = Bytes.toBytes("random_row");
append.add(TEST_FAMILY, Bytes.toBytes("qualifier"), Bytes.toBytes("value")); byte[] qualifier = Bytes.toBytes("q");
ACCESS_CONTROLLER.preAppend(ObserverContext.createAndPrepare(RCP_ENV, null), append); HTable t = new HTable(conf, TEST_TABLE);
Put put = new Put(row);
put.add(TEST_FAMILY, qualifier, Bytes.toBytes(1));
t.put(put);
Append append = new Append(row);
append.add(TEST_FAMILY, qualifier, Bytes.toBytes(2));
t.append(append);
return null; return null;
} }
}; };