This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch branch-3
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-3 by this push:
     new 92f8066b3f0 HBASE-28210 Addendum fix TestProcedureAdmin (#5532)
92f8066b3f0 is described below

commit 92f8066b3f05f0a9f2c64a2cd8bde78eeaf1f388
Author: Duo Zhang <zhang...@apache.org>
AuthorDate: Wed Nov 22 10:37:42 2023 +0800

    HBASE-28210 Addendum fix TestProcedureAdmin (#5532)
    
    (cherry picked from commit b1ccf33382780c27d96340dcfd1aec312ed2cb73)
---
 .../apache/hadoop/hbase/master/procedure/TestProcedureAdmin.java  | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestProcedureAdmin.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestProcedureAdmin.java
index 452a73d26ee..94539572a99 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestProcedureAdmin.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestProcedureAdmin.java
@@ -155,8 +155,7 @@ public class TestProcedureAdmin {
     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
@@ -164,6 +163,11 @@ public class TestProcedureAdmin {
       .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);

Reply via email to