HBASE-7581 TestAccessController depends on the execution order
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1434057 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5bc5ee613f
commit
b892e48c7e
|
@ -78,7 +78,9 @@ public class RetriesExhaustedException extends IOException {
|
|||
*/
|
||||
public RetriesExhaustedException(final int numTries,
|
||||
final List<ThrowableWithExtraContext> exceptions) {
|
||||
super(getMessage(numTries, exceptions));
|
||||
super(getMessage(numTries, exceptions),
|
||||
(exceptions != null && !exceptions.isEmpty() ?
|
||||
exceptions.get(exceptions.size() - 1).t : null));
|
||||
}
|
||||
|
||||
private static String getMessage(String callableVitals, int numTries,
|
||||
|
|
|
@ -675,10 +675,9 @@ public class TestAccessController {
|
|||
// action for checkAndPut()
|
||||
PrivilegedExceptionAction checkAndPut = new PrivilegedExceptionAction() {
|
||||
public Object run() throws Exception {
|
||||
HTable t = new HTable(conf, TEST_TABLE);
|
||||
Put p = new Put(Bytes.toBytes("random_row"));
|
||||
p.add(TEST_FAMILY, Bytes.toBytes("Qualifier"), Bytes.toBytes(1));
|
||||
|
||||
HTable t = new HTable(conf, TEST_TABLE);
|
||||
t.checkAndPut(Bytes.toBytes("random_row"), TEST_FAMILY, Bytes.toBytes("q"),
|
||||
Bytes.toBytes("test_value"), p);
|
||||
return null;
|
||||
|
@ -711,6 +710,10 @@ public class TestAccessController {
|
|||
}
|
||||
};
|
||||
verifyWrite(bulkLoadAction);
|
||||
|
||||
// Reinit after the bulk upload
|
||||
TEST_UTIL.getHBaseAdmin().disableTable(TEST_TABLE);
|
||||
TEST_UTIL.getHBaseAdmin().enableTable(TEST_TABLE);
|
||||
}
|
||||
|
||||
public class BulkLoadHelper {
|
||||
|
|
Loading…
Reference in New Issue