HDDS-1848. Fix TestOzoneManagerHA and TestOzoneManagerSnapShotProvider. (#1148)
This commit is contained in:
parent
a1251addff
commit
cf9ff08f4b
|
@ -234,6 +234,7 @@ public interface MiniOzoneCluster {
|
|||
|
||||
protected static final int DEFAULT_HB_INTERVAL_MS = 1000;
|
||||
protected static final int DEFAULT_HB_PROCESSOR_INTERVAL_MS = 100;
|
||||
protected static final int ACTIVE_OMS_NOT_SET = -1;
|
||||
|
||||
protected final OzoneConfiguration conf;
|
||||
protected final String path;
|
||||
|
@ -241,7 +242,7 @@ public interface MiniOzoneCluster {
|
|||
protected String clusterId;
|
||||
protected String omServiceId;
|
||||
protected int numOfOMs;
|
||||
protected int numOfActiveOMs;
|
||||
protected int numOfActiveOMs = ACTIVE_OMS_NOT_SET;
|
||||
|
||||
protected Optional<Boolean> enableTrace = Optional.of(false);
|
||||
protected Optional<Integer> hbInterval = Optional.empty();
|
||||
|
|
|
@ -169,6 +169,11 @@ public final class MiniOzoneHAClusterImpl extends MiniOzoneClusterImpl {
|
|||
throw new IllegalArgumentException("Number of active OMs cannot be " +
|
||||
"more than the total number of OMs");
|
||||
}
|
||||
|
||||
// If num of ActiveOMs is not set, set it to numOfOMs.
|
||||
if (numOfActiveOMs == ACTIVE_OMS_NOT_SET) {
|
||||
numOfActiveOMs = numOfOMs;
|
||||
}
|
||||
DefaultMetricsSystem.setMiniClusterMode(true);
|
||||
initializeConfiguration();
|
||||
StorageContainerManager scm;
|
||||
|
|
Loading…
Reference in New Issue