HBASE-17189 TestMasterObserver#wasModifyTableActionCalled uses wrong variables (Stephen Yuan Jiang)

This commit is contained in:
Stephen Yuan Jiang 2016-11-28 23:09:42 -08:00
parent b2d3fa1a8a
commit d87df9209a
1 changed files with 12 additions and 2 deletions

View File

@ -225,6 +225,8 @@ public class TestMasterObserver {
postBalanceCalled = false;
preBalanceSwitchCalled = false;
postBalanceSwitchCalled = false;
preShutdownCalled = false;
preStopMasterCalled = false;
preSnapshotCalled = false;
postSnapshotCalled = false;
preListSnapshotCalled = false;
@ -835,12 +837,20 @@ public class TestMasterObserver {
preShutdownCalled = true;
}
public boolean wasShutdownCalled() {
return preShutdownCalled;
}
@Override
public void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> env)
throws IOException {
preStopMasterCalled = true;
}
public boolean wasStopMasterCalled() {
return preStopMasterCalled;
}
@Override
public void preMasterInitialization(
ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException {
@ -1119,11 +1129,11 @@ public class TestMasterObserver {
}
public boolean wasModifyTableActionCalled() {
return preModifyColumnFamilyActionCalled && postCompletedModifyColumnFamilyActionCalled;
return preModifyTableActionCalled && postCompletedModifyTableActionCalled;
}
public boolean wasModifyTableActionCalledOnly() {
return preModifyColumnFamilyActionCalled && !postCompletedModifyColumnFamilyActionCalled;
return preModifyTableActionCalled && !postCompletedModifyTableActionCalled;
}
@Deprecated