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:
parent
c264d3f7ea
commit
adb7e27eb2
|
@ -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;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue