Skip to content

Commit

Permalink
HBASE-28210 Addendum fix TestProcedureAdmin (#5532)
Browse files Browse the repository at this point in the history
  • Loading branch information
Apache9 authored Nov 22, 2023
1 parent e799ee0 commit b1ccf33
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,19 @@ public void testAbortProcedureInterruptedNotAllowed() throws Exception {
final TableName tableName = TableName.valueOf(name.getMethodName());
final ProcedureExecutor<MasterProcedureEnv> procExec = getMasterProcedureExecutor();

RegionInfo[] regions =
MasterProcedureTestingUtility.createTable(procExec, tableName, null, "f");
MasterProcedureTestingUtility.createTable(procExec, tableName, null, "f");
ProcedureTestingUtility.waitNoProcedureRunning(procExec);
ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(procExec, true);
// Submit a procedure
long procId = procExec
.submitProcedure(new DisableTableProcedure(procExec.getEnvironment(), tableName, true));
// Wait for one step to complete
ProcedureTestingUtility.waitProcedure(procExec, procId);
// After HBASE-28210, the injection of kill before update is moved before we add rollback
// step, so here we need to run two steps, otherwise we will not consider the procedure as
// executed
MasterProcedureTestingUtility.restartMasterProcedureExecutor(procExec);
ProcedureTestingUtility.waitProcedure(procExec, procId);

// Set the mayInterruptIfRunning flag to false
boolean abortResult = procExec.abort(procId, false);
Expand Down

0 comments on commit b1ccf33

Please sign in to comment.