You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2020/01/20 10:25:29 UTC

[ignite] branch master updated: IGNITE-12227 Fix discovery pending messages logic causing incorrect calculation of baseline auto-adjust flag - Fixes #7150.

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

agoncharuk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 72e49ef  IGNITE-12227 Fix discovery pending messages logic causing incorrect calculation of baseline auto-adjust flag - Fixes #7150.
72e49ef is described below

commit 72e49efaaa348d81cb55abb0cd7c984a15fd17c5
Author: Anton Kalashnikov <ka...@yandex.ru>
AuthorDate: Mon Jan 20 13:03:48 2020 +0300

    IGNITE-12227 Fix discovery pending messages logic causing incorrect calculation of baseline auto-adjust flag - Fixes #7150.
    
    Signed-off-by: Alexey Goncharuk <al...@gmail.com>
---
 .../rest/JettyRestProcessorBaselineSelfTest.java   |  19 ++-
 .../org/apache/ignite/IgniteSystemProperties.java  |   7 +-
 .../cluster/DistributedBaselineConfiguration.java  | 101 ++++++++--------
 .../baseline/autoadjust/ChangeTopologyWatcher.java |  17 ++-
 .../distributed/DistributedBooleanProperty.java    |   2 +-
 ...ure.java => DistributedChangeableProperty.java} |  28 +++--
 .../distributed/DistributedComparableProperty.java |   2 +-
 .../DistributedConfigurationLifecycleListener.java |   6 +
 .../DistributedConfigurationProcessor.java         |  76 ++++++------
 .../distributed/DistributedProperty.java           | 119 +++----------------
 .../distributed/DistributedPropertyDispatcher.java |  21 ++--
 .../distributed/PropertyUpdateClosure.java         |  12 +-
 ...roperty.java => SimpleDistributedProperty.java} |  92 +++++---------
 .../persistence/DmsDataWriterWorker.java           |   2 +
 .../ignite/spi/discovery/tcp/ServerImpl.java       |  38 ++++--
 .../ClusterBaselineNodesMetricsSelfTest.java       |  22 +---
 .../processors/DeadLockOnNodeLeftExchangeTest.java |   3 +-
 .../IgniteAbstractDynamicCacheStartFailTest.java   |  22 ++--
 ...usterActivateDeactivateTestWithPersistence.java |  17 +--
 ...teDynamicCacheStartFailWithPersistenceTest.java |   6 -
 .../distributed/CacheBaselineTopologyTest.java     |  21 +---
 .../CacheDataLossOnPartitionMoveTest.java          |   6 +-
 .../CachePartitionLostWhileClearingTest.java       |   8 +-
 .../distributed/CacheRentingStateRepairTest.java   |   7 +-
 .../PartitionsEvictManagerAbstractTest.java        |   2 +-
 .../GridCacheRebalancingWithAsyncClearingTest.java |   7 +-
 .../processors/cache/mvcc/CacheMvccVacuumTest.java |  19 +--
 .../persistence/CleanupRestoredCachesSlowTest.java |   5 +-
 ...niteBaselineAffinityTopologyActivationTest.java |  24 ++--
 .../persistence/IgnitePdsCorruptedIndexTest.java   |   7 +-
 .../IgnitePdsPartitionFilesDestroyTest.java        |  54 ++++-----
 ...gniteRebalanceScheduleResendPartitionsTest.java |  16 +--
 ...ocalWalModeChangeDuringRebalancingSelfTest.java |  11 +-
 .../ClientAffinityAssignmentWithBaselineTest.java  |  19 +--
 .../IgniteAbsentEvictionNodeOutOfBaselineTest.java |   7 +-
 ...hangingBaselineDownCachePutAllFailoverTest.java |   7 +-
 ...hangingBaselineDownCacheRemoveFailoverTest.java |   6 +-
 ...eChangingBaselineUpCachePutAllFailoverTest.java |   7 +-
 ...eChangingBaselineUpCacheRemoveFailoverTest.java |   7 +-
 .../persistence/db/IgniteLogicalRecoveryTest.java  |   9 +-
 ...IgnitePdsCacheWalDisabledOnRebalancingTest.java |  18 +--
 .../db/IgnitePdsDataRegionMetricsTest.java         |   6 +-
 .../cache/persistence/db/IgnitePdsWithTtlTest.java |  15 ++-
 .../SlowHistoricalRebalanceSmallHistoryTest.java   |   7 +-
 ...CheckpointSimulationWithRealCpDisabledTest.java |  16 ---
 ...eWalFlushMultiNodeFailoverAbstractSelfTest.java |   6 +-
 .../persistence/db/wal/WalCompactionTest.java      |   8 +-
 .../transactions/PartitionUpdateCounterTest.java   |   8 +-
 .../TxCrossCachePartitionConsistencyTest.java      |   3 -
 .../TxPartitionCounterStateAbstractTest.java       |   3 -
 .../TxPartitionCounterStateConsistencyTest.java    |   4 +-
 .../processors/cluster/BaselineAutoAdjustTest.java |  35 ++++--
 .../DistributedConfigurationAbstractTest.java      | 132 ++-------------------
 .../DistributedConfigurationPersistentTest.java    | 128 ++++++++++++++++++++
 .../DistributedMetaStoragePersistentTest.java      |   6 +-
 .../metastorage/DistributedMetaStorageTest.java    |  34 ++++--
 .../service/IgniteServiceReassignmentTest.java     |   6 -
 .../ServiceDeploymentOutsideBaselineTest.java      |  30 ++---
 .../IgniteDiscoveryCacheReuseSelfTest.java         |   6 +-
 .../util/GridCommandHandlerAbstractTest.java       |   2 -
 ...idCommandHandlerClusterByClassAbstractTest.java |   3 +
 .../apache/ignite/util/GridCommandHandlerTest.java |  17 ++-
 .../persistence/RebuildIndexLogMessageTest.java    |   3 -
 ...ngingBaselineCacheQueryNodeRestartSelfTest.java |   7 +-
 64 files changed, 546 insertions(+), 818 deletions(-)

diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorBaselineSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorBaselineSelfTest.java
index aa20c50..1700f22 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorBaselineSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorBaselineSelfTest.java
@@ -17,22 +17,22 @@
 
 package org.apache.ignite.internal.processors.rest;
 
-import com.fasterxml.jackson.databind.JsonNode;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
+import com.fasterxml.jackson.databind.JsonNode;
 import org.apache.ignite.cluster.BaselineNode;
 import org.apache.ignite.configuration.DataRegionConfiguration;
 import org.apache.ignite.configuration.DataStorageConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.processors.rest.handlers.cluster.GridBaselineCommandResponse;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.jetbrains.annotations.Nullable;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.configuration.WALMode.NONE;
 import static org.apache.ignite.internal.processors.rest.GridRestResponse.STATUS_SUCCESS;
 
@@ -42,12 +42,11 @@ import static org.apache.ignite.internal.processors.rest.GridRestResponse.STATUS
 public class JettyRestProcessorBaselineSelfTest extends JettyRestProcessorCommonSelfTest {
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
         U.resolveWorkDirectory(U.defaultWorkDirectory(), "db", true);
 
         super.beforeTestsStarted();
 
+        grid(0).cluster().baselineAutoAdjustEnabled(false);
         // We need to activate cluster.
         grid(0).cluster().active(true);
     }
@@ -79,13 +78,6 @@ public class JettyRestProcessorBaselineSelfTest extends JettyRestProcessorCommon
         return cfg;
     }
 
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
-    }
-
     /**
      * @param nodes Collection of grid nodes.
      * @return Collection of node consistent IDs for given collection of grid nodes.
@@ -154,7 +146,10 @@ public class JettyRestProcessorBaselineSelfTest extends JettyRestProcessorCommon
 
         assertBaseline(content(null, GridRestCommand.BASELINE_CURRENT_STATE), sz, sz);
 
-        startGrid(sz);
+        IgniteEx ignite = startGrid(sz);
+
+        ignite.cluster().baselineAutoAdjustEnabled(false);
+
         assertBaseline(content(null, GridRestCommand.BASELINE_CURRENT_STATE), sz, sz + 1);
 
         assertBaseline(content(null, GridRestCommand.BASELINE_SET, "topVer",
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
index 5fe892c..b474eb9 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
@@ -17,13 +17,13 @@
 
 package org.apache.ignite;
 
+import javax.net.ssl.HostnameVerifier;
 import java.io.Serializable;
 import java.lang.management.RuntimeMXBean;
 import java.util.Arrays;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Properties;
-import javax.net.ssl.HostnameVerifier;
 import org.apache.ignite.cache.CacheEntryProcessor;
 import org.apache.ignite.cluster.ClusterGroup;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -1161,11 +1161,6 @@ public final class IgniteSystemProperties {
     public static final String IGNITE_NODE_IDS_HISTORY_SIZE = "IGNITE_NODE_IDS_HISTORY_SIZE";
 
     /**
-     * Flag to enable baseline auto-adjust by default.
-     */
-    public static final String IGNITE_BASELINE_AUTO_ADJUST_ENABLED = "IGNITE_BASELINE_AUTO_ADJUST_ENABLED";
-
-    /**
      * Maximum number of diagnostic warning messages per category, when waiting for PME.
      */
     public static final String IGNITE_DIAGNOSTIC_WARN_LIMIT = "IGNITE_DIAGNOSTIC_WARN_LIMIT";
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cluster/DistributedBaselineConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/cluster/DistributedBaselineConfiguration.java
index 7bed5cb..a27e582 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/cluster/DistributedBaselineConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/cluster/DistributedBaselineConfiguration.java
@@ -17,25 +17,26 @@
 
 package org.apache.ignite.internal.cluster;
 
+import java.io.Serializable;
 import java.util.Objects;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.internal.GridKernalContext;
-import org.apache.ignite.internal.processors.cluster.BaselineTopology;
+import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.processors.configuration.distributed.DistributePropertyListener;
-import org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty;
-import org.apache.ignite.internal.processors.configuration.distributed.DistributedLongProperty;
+import org.apache.ignite.internal.processors.configuration.distributed.DistributedChangeableProperty;
+import org.apache.ignite.internal.processors.configuration.distributed.DistributedConfigurationLifecycleListener;
+import org.apache.ignite.internal.processors.configuration.distributed.DistributedProperty;
+import org.apache.ignite.internal.processors.configuration.distributed.DistributedPropertyDispatcher;
 import org.apache.ignite.internal.processors.subscription.GridInternalSubscriptionProcessor;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
 import org.apache.ignite.internal.util.typedef.internal.CU;
+import org.apache.ignite.lang.IgniteInClosure;
 import org.jetbrains.annotations.NotNull;
 
 import static java.lang.String.format;
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
-import static org.apache.ignite.IgniteSystemProperties.getBoolean;
 import static org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty.detachedBooleanProperty;
 import static org.apache.ignite.internal.processors.configuration.distributed.DistributedLongProperty.detachedLongProperty;
-import static org.apache.ignite.internal.util.IgniteUtils.isLocalNodeCoordinator;
 
 /**
  * Distributed baseline configuration.
@@ -50,10 +51,6 @@ public class DistributedBaselineConfiguration {
     /** Message of baseline auto-adjust configuration. */
     private static final String AUTO_ADJUST_CONFIGURED_MESSAGE = "Baseline auto-adjust is '%s' with timeout='%d' ms";
 
-    /** Message of baseline auto-adjust parameter was changed from default. */
-    private static final String DEFAULT_PROPERTY_UPDATE_MESSAGE =
-        "Baseline parameter '%s' was changed from default value='%s' to '%s'";
-
     /** Message of baseline auto-adjust parameter was changed. */
     private static final String PROPERTY_UPDATE_MESSAGE =
         "Baseline parameter '%s' was changed from '%s' to '%s'";
@@ -65,19 +62,16 @@ public class DistributedBaselineConfiguration {
     private volatile boolean dfltEnabled;
 
     /** */
-    private final GridKernalContext ctx;
-
-    /** */
     private final IgniteLogger log;
 
     /** Value of manual baseline control or auto adjusting baseline. */
-    private final DistributedBooleanProperty baselineAutoAdjustEnabled =
+    private final DistributedChangeableProperty<Boolean> baselineAutoAdjustEnabled =
         detachedBooleanProperty("baselineAutoAdjustEnabled");
 
     /**
      * Value of time which we would wait before the actual topology change since last discovery event(node join/exit).
      */
-    private final DistributedLongProperty baselineAutoAdjustTimeout =
+    private final DistributedChangeableProperty<Long> baselineAutoAdjustTimeout =
         detachedLongProperty("baselineAutoAdjustTimeout");
 
     /**
@@ -88,70 +82,71 @@ public class DistributedBaselineConfiguration {
         GridInternalSubscriptionProcessor isp,
         GridKernalContext ctx,
         IgniteLogger log) {
-        this.ctx = ctx;
         this.log = log;
 
         boolean persistenceEnabled = ctx.config() != null && CU.isPersistenceEnabled(ctx.config());
 
         dfltTimeout = persistenceEnabled ? DEFAULT_PERSISTENCE_TIMEOUT : DEFAULT_IN_MEMORY_TIMEOUT;
-        dfltEnabled = getBoolean(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, !persistenceEnabled);
+        dfltEnabled = !persistenceEnabled;
 
         isp.registerDistributedConfigurationListener(
-            dispatcher -> {
-                baselineAutoAdjustEnabled.addListener(makeUpdateListener(dfltEnabled));
-                baselineAutoAdjustTimeout.addListener(makeUpdateListener(dfltTimeout));
-
-                dispatcher.registerProperty(baselineAutoAdjustEnabled);
-                dispatcher.registerProperty(baselineAutoAdjustTimeout);
+            new DistributedConfigurationLifecycleListener() {
+                @Override public void onReadyToRegister(DistributedPropertyDispatcher dispatcher) {
+                    baselineAutoAdjustEnabled.addListener(makeUpdateListener());
+                    baselineAutoAdjustTimeout.addListener(makeUpdateListener());
+
+                    dispatcher.registerProperties(baselineAutoAdjustEnabled, baselineAutoAdjustTimeout);
+                }
+
+                @Override public void onReadyToWrite() {
+                    setDefaultValue(baselineAutoAdjustEnabled, dfltEnabled, log);
+                    setDefaultValue(baselineAutoAdjustTimeout, dfltTimeout, log);
+                }
             }
         );
     }
 
     /**
-     * @param defaultVal Default value from which property can be changed in first time.
+     * @param property Property which value should be set.
+     * @param value Default value.
+     * @param log Logger.
+     * @param <T> Property type.
+     */
+    private <T extends Serializable> void setDefaultValue(DistributedProperty<T> property, T value, IgniteLogger log) {
+        if (property.get() == null) {
+            try {
+                property.propagateAsync(null, value)
+                    .listen((IgniteInClosure<IgniteInternalFuture<?>>)future -> {
+                        if (future.error() != null)
+                            log.error("Cannot set default value of '" + property.getName() + '\'', future.error());
+                    });
+            }
+            catch (IgniteCheckedException e) {
+                log.error("Cannot initiate setting default value of '" + property.getName() + '\'', e);
+            }
+        }
+    }
+
+    /**
      * @param <T> Type of property value.
      * @return Update property listener.
      */
-    @NotNull private <T> DistributePropertyListener<T> makeUpdateListener(Object defaultVal) {
+    @NotNull private <T> DistributePropertyListener<T> makeUpdateListener() {
         return (name, oldVal, newVal) -> {
-            if (!Objects.equals(oldVal, newVal)) {
-                if (oldVal == null)
-                    log.info(format(DEFAULT_PROPERTY_UPDATE_MESSAGE, name, defaultVal, newVal));
-                else
-                    log.info(format(PROPERTY_UPDATE_MESSAGE, name, oldVal, newVal));
-            }
+            if (!Objects.equals(oldVal, newVal))
+                log.info(format(PROPERTY_UPDATE_MESSAGE, name, oldVal, newVal));
         };
     }
 
     /**
      * Called when cluster performing activation.
-     *
-     * @throws IgniteCheckedException If failed.
      */
     public void onActivate() throws IgniteCheckedException {
-        if (baselineAutoAdjustEnabled.get() == null && isLocalNodeCoordinator(ctx.discovery())) {
-            boolean dfltEnableVal = getBoolean(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, isCurrentBaselineNew());
-
-            //Set default enable flag to cluster only if it is true.
-            if (dfltEnableVal)
-                baselineAutoAdjustEnabled.propagate(dfltEnableVal);
-        }
-
-        if (isLocalNodeCoordinator(ctx.discovery())) {
+        if (log.isInfoEnabled())
             log.info(format(AUTO_ADJUST_CONFIGURED_MESSAGE,
                 (isBaselineAutoAdjustEnabled() ? "enabled" : "disabled"),
                 getBaselineAutoAdjustTimeout()
             ));
-        }
-    }
-
-    /**
-     * @return {@code true} if current baseline is new.(It is first activation for cluster.)
-     */
-    private boolean isCurrentBaselineNew() {
-        BaselineTopology baselineTop = ctx.state().clusterState().baselineTopology();
-
-        return baselineTop != null && baselineTop.isNewTopology();
     }
 
     /**
@@ -167,7 +162,7 @@ public class DistributedBaselineConfiguration {
      */
     public GridFutureAdapter<?> updateBaselineAutoAdjustEnabledAsync(boolean baselineAutoAdjustEnabled)
         throws IgniteCheckedException {
-        return this.baselineAutoAdjustEnabled.propagateAsync(baselineAutoAdjustEnabled);
+        return this.baselineAutoAdjustEnabled.propagateAsync(!baselineAutoAdjustEnabled, baselineAutoAdjustEnabled);
     }
 
     /**
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/baseline/autoadjust/ChangeTopologyWatcher.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/baseline/autoadjust/ChangeTopologyWatcher.java
index 7af8902..93189970 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/baseline/autoadjust/ChangeTopologyWatcher.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/baseline/autoadjust/ChangeTopologyWatcher.java
@@ -58,6 +58,15 @@ public class ChangeTopologyWatcher implements GridLocalEventListener {
     /** Scheduler of specific task of baseline changing. */
     private final BaselineAutoAdjustScheduler baselineAutoAdjustScheduler;
 
+    /** */
+    private final boolean isPersistenceEnabled;
+
+    /**
+     * {@code true} if {@link ChangeTopologyWatcher} makes sense for local node or {@code false} otherwise(eg. local
+     * node is client).
+     */
+    private final boolean isSupportedByLocalNode;
+
     /** Last data for set new baseline. */
     private BaselineAutoAdjustData lastBaselineData = NULL_BASELINE_DATA;
 
@@ -77,6 +86,8 @@ public class ChangeTopologyWatcher implements GridLocalEventListener {
             this::isTopologyWatcherEnabled
         ), ctx.log(BaselineAutoAdjustScheduler.class));
         this.discoveryMgr = ctx.discovery();
+        this.isSupportedByLocalNode = !ctx.clientNode() && !ctx.isDaemon();
+        this.isPersistenceEnabled = CU.isPersistenceEnabled(cluster.ignite().configuration());
     }
 
     /** {@inheritDoc} */
@@ -124,8 +135,10 @@ public class ChangeTopologyWatcher implements GridLocalEventListener {
      * @return {@code true} if auto-adjust baseline enabled.
      */
     private boolean isTopologyWatcherEnabled() {
-        return stateProcessor.clusterState().active() && baselineConfiguration.isBaselineAutoAdjustEnabled()
-            && (CU.isPersistenceEnabled(cluster.ignite().configuration()) || cluster.baselineAutoAdjustTimeout() != 0L);
+        return isSupportedByLocalNode
+            && stateProcessor.clusterState().active()
+            && baselineConfiguration.isBaselineAutoAdjustEnabled()
+            && (isPersistenceEnabled || cluster.baselineAutoAdjustTimeout() != 0L);
     }
 
     /**
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedBooleanProperty.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedBooleanProperty.java
index 1239538..878ebb0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedBooleanProperty.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedBooleanProperty.java
@@ -20,7 +20,7 @@ package org.apache.ignite.internal.processors.configuration.distributed;
 /**
  * Implementation of {@link DistributedProperty} for {@link Boolean}.
  */
-public class DistributedBooleanProperty extends DistributedProperty<Boolean> {
+public class DistributedBooleanProperty extends SimpleDistributedProperty<Boolean> {
 
     /** {@inheritDoc} */
     DistributedBooleanProperty(String name) {
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/PropertyUpdateClosure.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedChangeableProperty.java
similarity index 59%
copy from modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/PropertyUpdateClosure.java
copy to modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedChangeableProperty.java
index 59cd1e4..dfd4a25 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/PropertyUpdateClosure.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedChangeableProperty.java
@@ -18,22 +18,28 @@
 package org.apache.ignite.internal.processors.configuration.distributed;
 
 import java.io.Serializable;
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.internal.util.future.GridFutureAdapter;
+import org.jetbrains.annotations.NotNull;
 
 /**
- * Closure of cluster wide update of distributed property.
+ * Inner interface to maintenance of distributed property.
  */
-@FunctionalInterface
-public interface PropertyUpdateClosure {
+public interface DistributedChangeableProperty<T extends Serializable> extends DistributedProperty<T> {
+    /**
+     * This property have been attached to processor.
+     */
+    void onAttached();
+
+    /**
+     * On this property ready to be update on cluster wide.
+     *
+     * @param updater Consumer for update value across cluster.
+     */
+    void onReadyForUpdate(@NotNull PropertyUpdateClosure updater);
 
     /**
-     * Update property on cluster.
+     * Update only local value without updating remote cluster.
      *
-     * @param key Property key.
-     * @param newValue New value.
-     * @return Future this boolean value.
-     * @throws IgniteCheckedException if failed.
+     * @param newVal New value.
      */
-    public GridFutureAdapter<?> update(String key, Serializable newValue) throws IgniteCheckedException;
+    void localUpdate(Serializable newVal);
 }
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedComparableProperty.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedComparableProperty.java
index dcc6c35..2e646d7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedComparableProperty.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedComparableProperty.java
@@ -23,7 +23,7 @@ import java.util.Objects;
 /**
  * Implementation of {@link DistributedProperty} for {@link Comparable}.
  */
-public class DistributedComparableProperty<T extends Comparable<T> & Serializable> extends DistributedProperty<T> {
+public class DistributedComparableProperty<T extends Comparable<T> & Serializable> extends SimpleDistributedProperty<T> {
 
     /** {@inheritDoc} */
     DistributedComparableProperty(String name) {
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedConfigurationLifecycleListener.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedConfigurationLifecycleListener.java
index cbdda67..b9b0119 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedConfigurationLifecycleListener.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedConfigurationLifecycleListener.java
@@ -26,4 +26,10 @@ public interface DistributedConfigurationLifecycleListener {
      * Notify about processor ready to register properties.
      */
     void onReadyToRegister(DistributedPropertyDispatcher dispatcher);
+
+    /**
+     * Notify about processor ready to write.
+     */
+    default void onReadyToWrite() {
+    }
 }
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedConfigurationProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedConfigurationProcessor.java
index f5a6fc1..89c2dea 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedConfigurationProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedConfigurationProcessor.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.configuration.distributed;
 
 import java.io.Serializable;
+import java.util.Arrays;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import org.apache.ignite.IgniteCheckedException;
@@ -27,6 +28,7 @@ import org.apache.ignite.internal.processors.metastorage.DistributedMetaStorage;
 import org.apache.ignite.internal.processors.metastorage.DistributedMetastorageLifecycleListener;
 import org.apache.ignite.internal.processors.metastorage.ReadableDistributedMetaStorage;
 import org.apache.ignite.internal.processors.subscription.GridInternalSubscriptionProcessor;
+import org.apache.ignite.internal.util.future.GridFutureAdapter;
 
 import static org.apache.ignite.internal.processors.configuration.distributed.DistributedConfigurationProcessor.AllowableAction.ACTUALIZE;
 import static org.apache.ignite.internal.processors.configuration.distributed.DistributedConfigurationProcessor.AllowableAction.CLUSTER_WIDE_UPDATE;
@@ -39,10 +41,10 @@ import static org.apache.ignite.internal.processors.configuration.distributed.Di
  */
 public class DistributedConfigurationProcessor extends GridProcessorAdapter implements DistributedPropertyDispatcher {
     /** Prefix of key for distributed meta storage. */
-    private static final String DIST_CONF_PREFIX = "distrConf";
+    private static final String DIST_CONF_PREFIX = "distrConf-";
 
     /** Properties storage. */
-    private final Map<String, DistributedProperty> props = new ConcurrentHashMap<>();
+    private final Map<String, DistributedChangeableProperty> props = new ConcurrentHashMap<>();
 
     /** Global metastorage. */
     private volatile DistributedMetaStorage distributedMetastorage;
@@ -69,7 +71,7 @@ public class DistributedConfigurationProcessor extends GridProcessorAdapter impl
                 distributedMetastorage.listen(
                     (key) -> key.startsWith(DIST_CONF_PREFIX),
                     (String key, Serializable oldVal, Serializable newVal) -> {
-                        DistributedProperty prop = props.get(toPropertyKey(key));
+                        DistributedChangeableProperty prop = props.get(toPropertyKey(key));
 
                         if (prop != null)
                             prop.localUpdate(newVal);
@@ -88,6 +90,9 @@ public class DistributedConfigurationProcessor extends GridProcessorAdapter impl
             @Override public void onReadyForWrite(DistributedMetaStorage metastorage) {
                 //Switch to cluster wide update action and do it on already registered properties.
                 switchCurrentActionTo(CLUSTER_WIDE_UPDATE);
+
+                isp.getDistributedConfigurationListeners()
+                    .forEach(DistributedConfigurationLifecycleListener::onReadyToWrite);
             }
         });
     }
@@ -129,53 +134,31 @@ public class DistributedConfigurationProcessor extends GridProcessorAdapter impl
         return metaStorageKey.substring(DIST_CONF_PREFIX.length());
     }
 
+    /** {@inheritDoc} */
+    @Override public <T extends DistributedChangeableProperty> void registerProperties(T... props) {
+        Arrays.stream(props)
+            .forEach(this::registerProperty);
+    }
+
     /**
      * Register property to processor and attach it if it possible.
      *
      * @param prop Property to attach to processor.
-     * @param <T> Type of property value.
      */
-    @Override public <T extends DistributedProperty> T registerProperty(T prop) {
+    @Override public <T extends Serializable> DistributedProperty<T> registerProperty(
+        DistributedChangeableProperty<T> prop
+    ) {
         doAllAllowableActions(prop);
 
         return prop;
     }
 
     /**
-     * Get registered property.
-     *
-     * @param <T> Type of property value.
-     */
-    public <T extends DistributedProperty> T getProperty(String name) {
-        return (T)props.get(name);
-    }
-
-    /**
-     * Create and attach new long property.
-     *
-     * @param name Name of property.
-     * @return Attached new property.
-     */
-    @Override public DistributedLongProperty registerLong(String name) {
-        return registerProperty(new DistributedLongProperty(name));
-    }
-
-    /**
-     * Create and attach new boolean property.
-     *
-     * @param name Name of property.
-     * @return Attached new property.
-     */
-    @Override public DistributedBooleanProperty registerBoolean(String name) {
-        return registerProperty(new DistributedBooleanProperty(name));
-    }
-
-    /**
      * Execute all allowable actions until current action on given property.
      *
      * @param prop Property which action should be executed on.
      */
-    private void doAllAllowableActions(DistributedProperty prop) {
+    private void doAllAllowableActions(DistributedChangeableProperty prop) {
         for (AllowableAction action : AllowableAction.values()) {
             doAction(action, prop);
 
@@ -190,7 +173,7 @@ public class DistributedConfigurationProcessor extends GridProcessorAdapter impl
      * @param act Action to execute.
      * @param prop Property which action should be execute on.
      */
-    private void doAction(AllowableAction act, DistributedProperty prop) {
+    private void doAction(AllowableAction act, DistributedChangeableProperty prop) {
         switch (act) {
             case REGISTER:
                 doRegister(prop);
@@ -211,7 +194,7 @@ public class DistributedConfigurationProcessor extends GridProcessorAdapter impl
      *
      * @param prop Property which action should be execute on.
      */
-    private void doRegister(DistributedProperty prop) {
+    private void doRegister(DistributedChangeableProperty prop) {
         if (props.containsKey(prop.getName()))
             throw new IllegalArgumentException("Property already exists : " + prop.getName());
 
@@ -227,7 +210,7 @@ public class DistributedConfigurationProcessor extends GridProcessorAdapter impl
      *
      * @param prop Property which action should be execute on.
      */
-    private void doActualize(DistributedProperty prop) {
+    private void doActualize(DistributedChangeableProperty prop) {
         Serializable readVal = null;
         try {
             readVal = distributedMetastorage.read(toMetaStorageKey(prop.getName()));
@@ -246,10 +229,19 @@ public class DistributedConfigurationProcessor extends GridProcessorAdapter impl
      *
      * @param prop Property which action should be execute on.
      */
-    private void doClusterWideUpdate(DistributedProperty prop) {
-        prop.onReadyForUpdate(
-            (key, newValue) -> distributedMetastorage.writeAsync(toMetaStorageKey(key), newValue)
-        );
+    private void doClusterWideUpdate(DistributedChangeableProperty prop) {
+        prop.onReadyForUpdate(new PropertyUpdateClosure() {
+            @Override public GridFutureAdapter<?> update(String key, Serializable newValue)
+                throws IgniteCheckedException {
+                return distributedMetastorage.writeAsync(toMetaStorageKey(key), newValue);
+            }
+
+            @Override
+            public GridFutureAdapter<?> casUpdate(String key, Serializable expectedValue, Serializable newValue)
+                throws IgniteCheckedException {
+                return distributedMetastorage.compareAndSetAsync(toMetaStorageKey(key), expectedValue, newValue);
+            }
+        });
     }
 
     /**
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedProperty.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedProperty.java
index 19787f3..f15da49 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedProperty.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedProperty.java
@@ -18,44 +18,13 @@
 package org.apache.ignite.internal.processors.configuration.distributed;
 
 import java.io.Serializable;
-import java.util.concurrent.ConcurrentLinkedQueue;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
-import org.apache.ignite.internal.util.tostring.GridToStringExclude;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.jetbrains.annotations.NotNull;
 
 /**
- * Wrapper of some serializable property providing ability of change this value across whole cluster.
+ * Public interface of distributed property usage.
  */
-public class DistributedProperty<T extends Serializable> {
-    /** Name of property. */
-    private final String name;
-
-    /** Property value. */
-    protected volatile T val;
-
-    /** Sign of attachment to the processor. */
-    private volatile boolean attached = false;
-
-    /** Listeners of property update. */
-    private final ConcurrentLinkedQueue<DistributePropertyListener<T>> updateListeners = new ConcurrentLinkedQueue<>();
-
-    /**
-     * Specific consumer for update value in cluster. It is null when property doesn't ready to update value on cluster
-     * wide.
-     */
-    @GridToStringExclude
-    private volatile PropertyUpdateClosure clusterWideUpdater;
-
-    /**
-     * @param name Name of property.
-     *
-     */
-    public DistributedProperty(String name) {
-        this.name = name;
-    }
-
+public interface DistributedProperty<T extends Serializable> {
     /**
      * Change value across whole cluster.
      *
@@ -63,110 +32,58 @@ public class DistributedProperty<T extends Serializable> {
      * @return {@code true} if value was successfully updated and {@code false} if cluster wide update was failed,
      * perhaps some concurrent operation was changed this value in same moment.
      * @throws DetachedPropertyException If this property have not been attached to processor yet, please call {@link
-     * DistributedConfigurationProcessor#registerProperty(DistributedProperty)} before this method.
+     * DistributedConfigurationProcessor#registerProperty(DistributedChangeableProperty)} before this method.
      * @throws NotWritablePropertyException If this property don't ready to cluster wide update yet, perhaps cluster is
      * not active yet.
      * @throws IgniteCheckedException If failed during cluster wide update.
      */
-    public boolean propagate(T newVal) throws IgniteCheckedException {
-        ensureClusterWideUpdateIsReady();
-
-        clusterWideUpdater.update(name, newVal).get();
-
-        return true;
-    }
+    boolean propagate(T newVal) throws IgniteCheckedException;
 
     /**
+     * Change value across whole cluster.
+     *
+     * @param newVal Value which this property should be changed on.
+     * @return Future for update operation.
      * @throws DetachedPropertyException If this property have not been attached to processor yet, please call {@link
-     * DistributedConfigurationProcessor#registerProperty(DistributedProperty)} before this method.
+     * DistributedConfigurationProcessor#registerProperty(DistributedChangeableProperty)} before this method.
      * @throws NotWritablePropertyException If this property don't ready to cluster wide update yet, perhaps cluster is
      * not active yet.
+     * @throws IgniteCheckedException If failed during cluster wide update.
      */
-    private void ensureClusterWideUpdateIsReady() throws DetachedPropertyException, NotWritablePropertyException {
-        if (!attached)
-            throw new DetachedPropertyException(name);
-
-        if (clusterWideUpdater == null)
-            throw new NotWritablePropertyException(name);
-    }
+    GridFutureAdapter<?> propagateAsync(T newVal) throws IgniteCheckedException;
 
     /**
      * Change value across whole cluster.
      *
      * @param newVal Value which this property should be changed on.
+     * @param expectedVal Value from which this property should be changed.
      * @return Future for update operation.
      * @throws DetachedPropertyException If this property have not been attached to processor yet, please call {@link
-     * DistributedConfigurationProcessor#registerProperty(DistributedProperty)} before this method.
+     * DistributedConfigurationProcessor#registerProperty(DistributedChangeableProperty)} before this method.
      * @throws NotWritablePropertyException If this property don't ready to cluster wide update yet, perhaps cluster is
      * not active yet.
      * @throws IgniteCheckedException If failed during cluster wide update.
      */
-    public GridFutureAdapter<?> propagateAsync(T newVal) throws IgniteCheckedException {
-        ensureClusterWideUpdateIsReady();
-
-        return clusterWideUpdater.update(name, newVal);
-    }
+    GridFutureAdapter<?> propagateAsync(T expectedVal, T newVal) throws IgniteCheckedException;
 
     /**
      * @return Current property value.
      */
-    public T get() {
-        return val;
-    }
+    T get();
 
     /**
      * @param dfltVal Default value when current value is null.
      * @return Current property value.
      */
-    public T getOrDefault(T dfltVal) {
-        return val == null ? dfltVal : val;
-    }
+    T getOrDefault(T dfltVal);
 
     /**
      * @return Name of property.
      */
-    public String getName() {
-        return name;
-    }
+    String getName();
 
     /**
      * @param listener Update listener.
      */
-    public void addListener(DistributePropertyListener<T> listener) {
-        updateListeners.add(listener);
-    }
-
-    /**
-     * This property have been attached to processor.
-     */
-    void onAttached() {
-        attached = true;
-    }
-
-    /**
-     * On this property ready to be update on cluster wide.
-     *
-     * @param updater Consumer for update value across cluster.
-     */
-    void onReadyForUpdate(@NotNull PropertyUpdateClosure updater) {
-        this.clusterWideUpdater = updater;
-    }
-
-    /**
-     * Update only local value without updating remote cluster.
-     *
-     * @param newVal New value.
-     */
-    void localUpdate(Serializable newVal) {
-        T oldVal = val;
-
-        val = (T)newVal;
-
-        updateListeners.forEach(listener -> listener.onUpdate(name, oldVal, val));
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(DistributedProperty.class, this);
-    }
+    void addListener(DistributePropertyListener<T> listener);
 }
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedPropertyDispatcher.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedPropertyDispatcher.java
index f7b36dc..1b600bb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedPropertyDispatcher.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedPropertyDispatcher.java
@@ -17,6 +17,8 @@
 
 package org.apache.ignite.internal.processors.configuration.distributed;
 
+import java.io.Serializable;
+
 /**
  * Dispatcher of distributed properties.
  *
@@ -26,24 +28,15 @@ public interface DistributedPropertyDispatcher {
     /**
      * Attach already created property.
      *
-     * @param prop Property to attach to processor.
+     * @param props Properties to attach to processor.
      * @param <T> Type of property value.
      */
-    public <T extends DistributedProperty> T registerProperty(T prop);
-
-    /**
-     * Create and attach new long property.
-     *
-     * @param name Name of property.
-     * @return Attached new property.
-     */
-    public DistributedLongProperty registerLong(String name);
+    <T extends DistributedChangeableProperty> void registerProperties(T... props);
 
     /**
-     * Create and attach new boolean property.
+     * Attach already created property.
      *
-     * @param name Name of property.
-     * @return Attached new property.
+     * @param prop Property to attach to processor.
      */
-    public DistributedBooleanProperty registerBoolean(String name);
+    <T extends Serializable> DistributedProperty<T> registerProperty(DistributedChangeableProperty<T> prop);
 }
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/PropertyUpdateClosure.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/PropertyUpdateClosure.java
index 59cd1e4..a3b2023 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/PropertyUpdateClosure.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/PropertyUpdateClosure.java
@@ -24,7 +24,6 @@ import org.apache.ignite.internal.util.future.GridFutureAdapter;
 /**
  * Closure of cluster wide update of distributed property.
  */
-@FunctionalInterface
 public interface PropertyUpdateClosure {
 
     /**
@@ -36,4 +35,15 @@ public interface PropertyUpdateClosure {
      * @throws IgniteCheckedException if failed.
      */
     public GridFutureAdapter<?> update(String key, Serializable newValue) throws IgniteCheckedException;
+
+    /**
+     * Update property on cluster using compare and set way.
+     *
+     * @param key Property key.
+     * @param expectedValue Expected value for CAS.
+     * @param newValue New value.
+     * @return Future this boolean value. * @throws IgniteCheckedException if failed.
+     */
+    public GridFutureAdapter<?> casUpdate(String key, Serializable expectedValue, Serializable newValue)
+        throws IgniteCheckedException;
 }
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedProperty.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/SimpleDistributedProperty.java
similarity index 55%
copy from modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedProperty.java
copy to modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/SimpleDistributedProperty.java
index 19787f3..c549968 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedProperty.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/SimpleDistributedProperty.java
@@ -28,7 +28,7 @@ import org.jetbrains.annotations.NotNull;
 /**
  * Wrapper of some serializable property providing ability of change this value across whole cluster.
  */
-public class DistributedProperty<T extends Serializable> {
+public class SimpleDistributedProperty<T extends Serializable> implements DistributedChangeableProperty<T> {
     /** Name of property. */
     private final String name;
 
@@ -50,25 +50,13 @@ public class DistributedProperty<T extends Serializable> {
 
     /**
      * @param name Name of property.
-     *
      */
-    public DistributedProperty(String name) {
+    public SimpleDistributedProperty(String name) {
         this.name = name;
     }
 
-    /**
-     * Change value across whole cluster.
-     *
-     * @param newVal Value which this property should be changed on.
-     * @return {@code true} if value was successfully updated and {@code false} if cluster wide update was failed,
-     * perhaps some concurrent operation was changed this value in same moment.
-     * @throws DetachedPropertyException If this property have not been attached to processor yet, please call {@link
-     * DistributedConfigurationProcessor#registerProperty(DistributedProperty)} before this method.
-     * @throws NotWritablePropertyException If this property don't ready to cluster wide update yet, perhaps cluster is
-     * not active yet.
-     * @throws IgniteCheckedException If failed during cluster wide update.
-     */
-    public boolean propagate(T newVal) throws IgniteCheckedException {
+    /** {@inheritDoc} */
+    @Override public boolean propagate(T newVal) throws IgniteCheckedException {
         ensureClusterWideUpdateIsReady();
 
         clusterWideUpdater.update(name, newVal).get();
@@ -78,7 +66,7 @@ public class DistributedProperty<T extends Serializable> {
 
     /**
      * @throws DetachedPropertyException If this property have not been attached to processor yet, please call {@link
-     * DistributedConfigurationProcessor#registerProperty(DistributedProperty)} before this method.
+     * DistributedConfigurationProcessor#registerProperty(DistributedChangeableProperty)} before this method.
      * @throws NotWritablePropertyException If this property don't ready to cluster wide update yet, perhaps cluster is
      * not active yet.
      */
@@ -90,74 +78,52 @@ public class DistributedProperty<T extends Serializable> {
             throw new NotWritablePropertyException(name);
     }
 
-    /**
-     * Change value across whole cluster.
-     *
-     * @param newVal Value which this property should be changed on.
-     * @return Future for update operation.
-     * @throws DetachedPropertyException If this property have not been attached to processor yet, please call {@link
-     * DistributedConfigurationProcessor#registerProperty(DistributedProperty)} before this method.
-     * @throws NotWritablePropertyException If this property don't ready to cluster wide update yet, perhaps cluster is
-     * not active yet.
-     * @throws IgniteCheckedException If failed during cluster wide update.
-     */
-    public GridFutureAdapter<?> propagateAsync(T newVal) throws IgniteCheckedException {
+    /** {@inheritDoc} */
+    @Override public GridFutureAdapter<?> propagateAsync(T newVal) throws IgniteCheckedException {
         ensureClusterWideUpdateIsReady();
 
         return clusterWideUpdater.update(name, newVal);
     }
 
-    /**
-     * @return Current property value.
-     */
-    public T get() {
+    /** {@inheritDoc} */
+    @Override public GridFutureAdapter<?> propagateAsync(T expectedVal, T newVal) throws IgniteCheckedException {
+        ensureClusterWideUpdateIsReady();
+
+        return clusterWideUpdater.casUpdate(name, expectedVal, newVal);
+    }
+
+    /** {@inheritDoc} */
+    @Override public T get() {
         return val;
     }
 
-    /**
-     * @param dfltVal Default value when current value is null.
-     * @return Current property value.
-     */
-    public T getOrDefault(T dfltVal) {
+    /** {@inheritDoc} */
+    @Override public T getOrDefault(T dfltVal) {
         return val == null ? dfltVal : val;
     }
 
-    /**
-     * @return Name of property.
-     */
-    public String getName() {
+    /** {@inheritDoc} */
+    @Override public String getName() {
         return name;
     }
 
-    /**
-     * @param listener Update listener.
-     */
-    public void addListener(DistributePropertyListener<T> listener) {
+    /** {@inheritDoc} */
+    @Override public void addListener(DistributePropertyListener<T> listener) {
         updateListeners.add(listener);
     }
 
-    /**
-     * This property have been attached to processor.
-     */
-    void onAttached() {
+    /** {@inheritDoc} */
+    @Override public void onAttached() {
         attached = true;
     }
 
-    /**
-     * On this property ready to be update on cluster wide.
-     *
-     * @param updater Consumer for update value across cluster.
-     */
-    void onReadyForUpdate(@NotNull PropertyUpdateClosure updater) {
+    /** {@inheritDoc} */
+    @Override public void onReadyForUpdate(@NotNull PropertyUpdateClosure updater) {
         this.clusterWideUpdater = updater;
     }
 
-    /**
-     * Update only local value without updating remote cluster.
-     *
-     * @param newVal New value.
-     */
-    void localUpdate(Serializable newVal) {
+    /** {@inheritDoc} */
+    @Override public void localUpdate(Serializable newVal) {
         T oldVal = val;
 
         val = (T)newVal;
@@ -167,6 +133,6 @@ public class DistributedProperty<T extends Serializable> {
 
     /** {@inheritDoc} */
     @Override public String toString() {
-        return S.toString(DistributedProperty.class, this);
+        return S.toString(SimpleDistributedProperty.class, this);
     }
 }
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/metastorage/persistence/DmsDataWriterWorker.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/metastorage/persistence/DmsDataWriterWorker.java
index 96c14ee..1c333b6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/metastorage/persistence/DmsDataWriterWorker.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/metastorage/persistence/DmsDataWriterWorker.java
@@ -174,6 +174,8 @@ class DmsDataWriterWorker extends GridWorker {
 
                         metastorage.write(versionKey(), fullNodeData.ver);
 
+                        workerDmsVer = fullNodeData.ver;
+
                         metastorage.remove(cleanupGuardKey());
                     }
                     else if (update instanceof Long) {
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index 4a4b15a..0d328f3 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -17,6 +17,9 @@
 
 package org.apache.ignite.spi.discovery.tcp;
 
+import javax.net.ssl.SSLException;
+import javax.net.ssl.SSLServerSocket;
+import javax.net.ssl.SSLSocket;
 import java.io.BufferedInputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -58,9 +61,6 @@ import java.util.concurrent.LinkedBlockingDeque;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicReference;
-import javax.net.ssl.SSLException;
-import javax.net.ssl.SSLServerSocket;
-import javax.net.ssl.SSLSocket;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
@@ -2525,6 +2525,9 @@ class ServerImpl extends TcpDiscoveryImpl {
         /** */
         final IgniteUuid id;
 
+        /** */
+        final boolean verified;
+
         /**
          * @param msg Message.
          */
@@ -2535,6 +2538,7 @@ class ServerImpl extends TcpDiscoveryImpl {
 
             id = msg.id();
             customMsg = msg instanceof TcpDiscoveryCustomEventMessage;
+            verified = msg.verified();
         }
 
         /** {@inheritDoc} */
@@ -2604,14 +2608,22 @@ class ServerImpl extends TcpDiscoveryImpl {
             @Nullable IgniteUuid customDiscardId
         ) {
             this.msgs.clear();
+            this.customDiscardId = null;
+            this.discardId = null;
 
             if (msgs != null) {
-                for (TcpDiscoveryAbstractMessage msg : msgs)
-                    this.msgs.add(new PendingMessage(msg));
-            }
+                for (TcpDiscoveryAbstractMessage msg : msgs) {
+                    PendingMessage pm = new PendingMessage(msg);
 
-            this.discardId = discardId;
-            this.customDiscardId = customDiscardId;
+                    this.msgs.add(pm);
+
+                    if (pm.customMsg && pm.id.equals(customDiscardId))
+                        this.customDiscardId = customDiscardId;
+
+                    if (!pm.customMsg && pm.id.equals(discardId))
+                        this.discardId = discardId;
+                }
+            }
         }
 
         /**
@@ -2665,7 +2677,8 @@ class ServerImpl extends TcpDiscoveryImpl {
                         if (F.eq(customDiscardId, msg.id)) {
                             msg.msg = null;
 
-                            return;
+                            if (msg.verified)
+                                return;
                         }
                     }
                 }
@@ -2676,7 +2689,8 @@ class ServerImpl extends TcpDiscoveryImpl {
                         if (F.eq(discardId, msg.id)) {
                             msg.msg = null;
 
-                            return;
+                            if (msg.verified)
+                                return;
                         }
                     }
                 }
@@ -2747,7 +2761,7 @@ class ServerImpl extends TcpDiscoveryImpl {
                         if (skipCustomMsg) {
                             assert customDiscardId != null;
 
-                            if (F.eq(customDiscardId, msg0.id))
+                            if (F.eq(customDiscardId, msg0.id) && msg0.verified)
                                 skipCustomMsg = false;
 
                             continue;
@@ -2757,7 +2771,7 @@ class ServerImpl extends TcpDiscoveryImpl {
                         if (skipMsg) {
                             assert discardId != null;
 
-                            if (F.eq(discardId, msg0.id))
+                            if (F.eq(discardId, msg0.id) && msg0.verified)
                                 skipMsg = false;
 
                             continue;
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterBaselineNodesMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterBaselineNodesMetricsSelfTest.java
index 3fd6480..c7239bd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterBaselineNodesMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterBaselineNodesMetricsSelfTest.java
@@ -17,12 +17,12 @@
 
 package org.apache.ignite.internal;
 
-import java.lang.management.ManagementFactory;
-import java.util.Collection;
 import javax.management.MBeanServer;
 import javax.management.MBeanServerInvocationHandler;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
+import java.lang.management.ManagementFactory;
+import java.util.Collection;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cluster.BaselineNode;
 import org.apache.ignite.configuration.DataRegionConfiguration;
@@ -35,8 +35,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.testframework.junits.common.GridCommonTest;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
-
 /**
  * Baseline nodes metrics self test.
  */
@@ -47,20 +45,6 @@ public class ClusterBaselineNodesMetricsSelfTest extends GridCommonAbstractTest
         stopAllGrids();
     }
 
-    /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
-        super.beforeTestsStarted();
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
-    }
-
     /**
      * @throws Exception If failed.
      */
@@ -68,6 +52,8 @@ public class ClusterBaselineNodesMetricsSelfTest extends GridCommonAbstractTest
     public void testBaselineNodes() throws Exception {
         // Start 2 server nodes.
         IgniteEx ignite0 = startGrid(0);
+
+        ignite0.cluster().baselineAutoAdjustEnabled(false);
         startGrid(1);
 
         // Cluster metrics.
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/DeadLockOnNodeLeftExchangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/DeadLockOnNodeLeftExchangeTest.java
index a36d286..48b0ac2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/DeadLockOnNodeLeftExchangeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/DeadLockOnNodeLeftExchangeTest.java
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.internal.processors;
 
-import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.configuration.DataRegionConfiguration;
 import org.apache.ignite.configuration.DataStorageConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -78,12 +77,12 @@ public class DeadLockOnNodeLeftExchangeTest extends GridCommonAbstractTest {
     /** */
     @Test
     @WithSystemProperty(key = ExchangeContext.IGNITE_EXCHANGE_COMPATIBILITY_VER_1, value = "true")
-    @WithSystemProperty(key = IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED, value = "false")
     public void test() throws Exception {
         startGrids(4);
 
         IgniteClusterEx cluster = grid(0).cluster();
 
+        cluster.baselineAutoAdjustEnabled(false);
         cluster.active(true);
 
         TestRecordingCommunicationSpi spi = TestRecordingCommunicationSpi.spi(grid(3));
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteAbstractDynamicCacheStartFailTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteAbstractDynamicCacheStartFailTest.java
index f199fa7..de8e506 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteAbstractDynamicCacheStartFailTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteAbstractDynamicCacheStartFailTest.java
@@ -17,16 +17,6 @@
 
 package org.apache.ignite.internal.processors.cache;
 
-import java.io.ObjectInputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.UUID;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicInteger;
 import javax.cache.CacheException;
 import javax.cache.configuration.Factory;
 import javax.management.Attribute;
@@ -50,6 +40,16 @@ import javax.management.OperationsException;
 import javax.management.QueryExp;
 import javax.management.ReflectionException;
 import javax.management.loading.ClassLoaderRepository;
+import java.io.ObjectInputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.UUID;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteDataStreamer;
@@ -553,6 +553,8 @@ public abstract class IgniteAbstractDynamicCacheStartFailTest extends GridCacheA
 
             Ignite clientNode = startGrid(clientName1, clientCfg);
 
+            clientNode.cluster().baselineAutoAdjustEnabled(false);
+
             List<BaselineNode> baseline = new ArrayList<>(grid(0).cluster().currentBaselineTopology());
 
             baseline.add(serverNode.cluster().localNode());
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistence.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistence.java
index 21d93d7..e267eae 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistence.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistence.java
@@ -48,10 +48,9 @@ import org.junit.Assert;
 import org.junit.Assume;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.cluster.ClusterState.ACTIVE;
-import static org.apache.ignite.cluster.ClusterState.INACTIVE;
 import static org.apache.ignite.cluster.ClusterState.ACTIVE_READ_ONLY;
+import static org.apache.ignite.cluster.ClusterState.INACTIVE;
 import static org.apache.ignite.testframework.GridTestUtils.assertActive;
 import static org.apache.ignite.testframework.GridTestUtils.assertThrowsAnyCause;
 import static org.apache.ignite.testframework.GridTestUtils.assertThrowsWithCause;
@@ -66,20 +65,6 @@ public class IgniteClusterActivateDeactivateTestWithPersistence extends IgniteCl
     }
 
     /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
-        super.beforeTestsStarted();
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
-    }
-
-    /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
         cleanPersistenceDir();
 
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartFailWithPersistenceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartFailWithPersistenceTest.java
index 09268da..8643b66 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartFailWithPersistenceTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartFailWithPersistenceTest.java
@@ -25,8 +25,6 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.configuration.WALMode;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
-
 /**
  * Tests the recovery after a dynamic cache start failure, with enabled persistence.
  */
@@ -59,8 +57,6 @@ public class IgniteDynamicCacheStartFailWithPersistenceTest extends IgniteAbstra
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
         cleanPersistenceDir();
 
         startGrids(gridCount());
@@ -77,8 +73,6 @@ public class IgniteDynamicCacheStartFailWithPersistenceTest extends IgniteAbstra
         super.afterTestsStopped();
 
         cleanPersistenceDir();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
     }
 
     /** {@inheritDoc} */
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBaselineTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBaselineTopologyTest.java
index 6d80c19..c7e4d04 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBaselineTopologyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBaselineTopologyTest.java
@@ -61,7 +61,6 @@ import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_WAL_LOG_TX_RECORDS;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -90,20 +89,6 @@ public class CacheBaselineTopologyTest extends GridCommonAbstractTest {
     private static final String DATA_NODE = "dataNodeUserAttr";
 
     /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
-        super.beforeTestsStarted();
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
-    }
-
-    /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
         super.beforeTest();
 
@@ -179,6 +164,7 @@ public class CacheBaselineTopologyTest extends GridCommonAbstractTest {
 
             IgniteEx ignite = startGrid(2);
 
+            ignite.cluster().baselineAutoAdjustEnabled(false);
             ignite.cluster().active(true);
 
             awaitPartitionMapExchange();
@@ -253,6 +239,7 @@ public class CacheBaselineTopologyTest extends GridCommonAbstractTest {
 
         IgniteEx ignite = grid(0);
 
+        ignite.cluster().baselineAutoAdjustEnabled(false);
         ignite.cluster().active(true);
 
         awaitPartitionMapExchange();
@@ -405,6 +392,7 @@ public class CacheBaselineTopologyTest extends GridCommonAbstractTest {
 
         IgniteEx ig = grid(0);
 
+        ig.cluster().baselineAutoAdjustEnabled(false);
         ig.cluster().active(true);
 
         assertTrue(ig.cluster().active());
@@ -451,6 +439,7 @@ public class CacheBaselineTopologyTest extends GridCommonAbstractTest {
         else
             ignite = grid(0);
 
+        ignite.cluster().baselineAutoAdjustEnabled(false);
         ignite.cluster().active(true);
 
         awaitPartitionMapExchange();
@@ -1053,6 +1042,8 @@ public class CacheBaselineTopologyTest extends GridCommonAbstractTest {
     public void testSettingBaselineTopologyWithOfflineNodeFromOldTopology() throws Exception {
         Ignite ignite = startGrids(2);
 
+        ignite.cluster().baselineAutoAdjustEnabled(false);
+
         ignite.cluster().active(true);
 
         stopGrid(1);
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java
index cdf6c24..4df5c65 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java
@@ -47,7 +47,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.jetbrains.annotations.Nullable;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.EVICTED;
 import static org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.OWNING;
 
@@ -100,16 +99,12 @@ public class CacheDataLossOnPartitionMoveTest extends GridCommonAbstractTest {
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
         super.beforeTestsStarted();
     }
 
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
     }
 
     /**
@@ -139,6 +134,7 @@ public class CacheDataLossOnPartitionMoveTest extends GridCommonAbstractTest {
         try {
             Ignite ignite = startGridsMultiThreaded(GRIDS_CNT / 2, false);
 
+            ignite.cluster().baselineAutoAdjustEnabled(false);
             ignite.cluster().active(true);
 
             List<Integer> toCp = movingKeysAfterJoin(ignite, DEFAULT_CACHE_NAME, 1,
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePartitionLostWhileClearingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePartitionLostWhileClearingTest.java
index 53cb27b..cbf4d15 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePartitionLostWhileClearingTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePartitionLostWhileClearingTest.java
@@ -17,6 +17,8 @@
 
 package org.apache.ignite.internal.processors.cache.distributed;
 
+import java.util.ArrayList;
+import java.util.List;
 import org.apache.ignite.IgniteDataStreamer;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.cluster.ClusterNode;
@@ -26,14 +28,9 @@ import org.apache.ignite.configuration.DataStorageConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.configuration.WALMode;
 import org.apache.ignite.internal.IgniteEx;
-import org.apache.ignite.testframework.junits.WithSystemProperty;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Test;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 
@@ -43,7 +40,6 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED;
  * <p>
  * Expected result: no assertions are triggered.
  */
-@WithSystemProperty(key = IGNITE_BASELINE_AUTO_ADJUST_ENABLED, value = "false")
 public class CachePartitionLostWhileClearingTest extends GridCommonAbstractTest {
     /** */
     private static final int PARTS_CNT = 64;
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRentingStateRepairTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRentingStateRepairTest.java
index f512745..69beba8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRentingStateRepairTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRentingStateRepairTest.java
@@ -40,7 +40,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.jetbrains.annotations.Nullable;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.testframework.GridTestUtils.waitForCondition;
 
 /**
@@ -92,16 +91,12 @@ public class CacheRentingStateRepairTest extends GridCommonAbstractTest {
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
         super.beforeTestsStarted();
     }
 
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
     }
 
     /** {@inheritDoc} */
@@ -117,6 +112,7 @@ public class CacheRentingStateRepairTest extends GridCommonAbstractTest {
         try {
             IgniteEx g0 = startGrid(0);
 
+            g0.cluster().baselineAutoAdjustEnabled(false);
             startGrid(1);
 
             g0.cluster().active(true);
@@ -246,6 +242,7 @@ public class CacheRentingStateRepairTest extends GridCommonAbstractTest {
         try {
             IgniteEx g0 = startGrids(2);
 
+            g0.cluster().baselineAutoAdjustEnabled(false);
             g0.cluster().active(true);
 
             awaitPartitionMapExchange();
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/PartitionsEvictManagerAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/PartitionsEvictManagerAbstractTest.java
index e49e07f..8685d05 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/PartitionsEvictManagerAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/PartitionsEvictManagerAbstractTest.java
@@ -17,13 +17,13 @@
 
 package org.apache.ignite.internal.processors.cache.distributed.dht.topology;
 
+import javax.annotation.Nullable;
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
 import java.util.Queue;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.atomic.AtomicBoolean;
-import javax.annotation.Nullable;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.configuration.DataRegionConfiguration;
 import org.apache.ignite.configuration.DataStorageConfiguration;
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java
index b72a19b..f99f0a2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java
@@ -41,7 +41,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Assert;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_PDS_MAX_CHECKPOINT_MEMORY_HISTORY_SIZE;
 
 /**
@@ -83,16 +82,12 @@ public class GridCacheRebalancingWithAsyncClearingTest extends GridCommonAbstrac
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
         super.beforeTestsStarted();
     }
 
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
     }
 
     /** {@inheritDoc} */
@@ -220,6 +215,8 @@ public class GridCacheRebalancingWithAsyncClearingTest extends GridCommonAbstrac
     @Test
     public void testCorrectRebalancingCurrentlyRentingPartitions() throws Exception {
         IgniteEx ignite = startGrids(3);
+
+        ignite.cluster().baselineAutoAdjustEnabled(false);
         ignite.cluster().active(true);
 
         // High number of keys triggers long partition eviction.
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccVacuumTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccVacuumTest.java
index d1864cb..6d46b53 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccVacuumTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccVacuumTest.java
@@ -35,7 +35,6 @@ import org.apache.ignite.testframework.GridTestUtils;
 import org.junit.Ignore;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 
 /**
@@ -43,20 +42,6 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED;
  */
 public class CacheMvccVacuumTest extends CacheMvccAbstractTest {
     /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
-        super.beforeTestsStarted();
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheMode cacheMode() {
         return PARTITIONED;
     }
@@ -187,6 +172,7 @@ public class CacheMvccVacuumTest extends CacheMvccAbstractTest {
 
         Ignite node0 = startGrid(0);
 
+        node0.cluster().baselineAutoAdjustEnabled(false);
         ensureNoVacuum(node0);
 
         node0.cluster().active(true);
@@ -220,6 +206,7 @@ public class CacheMvccVacuumTest extends CacheMvccAbstractTest {
         Ignite node0 = startGrid(0);
         Ignite node1 = startGrid(1);
 
+        node0.cluster().baselineAutoAdjustEnabled(false);
         node0.cluster().active(true);
 
         IgniteCache<Object, Object> cache = node0.createCache(
@@ -258,6 +245,8 @@ public class CacheMvccVacuumTest extends CacheMvccAbstractTest {
         Ignite node0 = startGrid(0);
         Ignite node1 = startGrid(1);
 
+        node0.cluster().baselineAutoAdjustEnabled(false);
+
         ensureNoVacuum(node0);
         ensureNoVacuum(node1);
 
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/CleanupRestoredCachesSlowTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/CleanupRestoredCachesSlowTest.java
index bbf8b66..53ee07b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/CleanupRestoredCachesSlowTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/CleanupRestoredCachesSlowTest.java
@@ -25,7 +25,6 @@ import java.util.concurrent.atomic.AtomicReference;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteLogger;
-import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.DataRegionConfiguration;
@@ -41,7 +40,6 @@ import org.apache.ignite.logger.NullLogger;
 import org.apache.ignite.testframework.ListeningTestLogger;
 import org.apache.ignite.testframework.LogListener;
 import org.apache.ignite.testframework.MessageOrderLogListener;
-import org.apache.ignite.testframework.junits.WithSystemProperty;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Test;
 
@@ -51,7 +49,6 @@ import static java.util.Collections.singletonList;
 /**
  * Test async LFS cleanup during non-BLT node join.
  */
-@WithSystemProperty(key = IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED, value = "false")
 public class CleanupRestoredCachesSlowTest extends GridCommonAbstractTest implements Serializable {
     /** */
     private static class FilePageStoreManagerChild extends FilePageStoreManager {
@@ -169,6 +166,8 @@ public class CleanupRestoredCachesSlowTest extends GridCommonAbstractTest implem
     public void testCleanupSlow() throws Exception {
         Ignite ignite = startGrids(2);
 
+        ignite.cluster().baselineAutoAdjustEnabled(false);
+
         ClusterNode cn0 = grid(0).cluster().localNode();
         ClusterNode cn1 = grid(1).cluster().localNode();
 
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteBaselineAffinityTopologyActivationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteBaselineAffinityTopologyActivationTest.java
index 6fec270..e26bfe0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteBaselineAffinityTopologyActivationTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteBaselineAffinityTopologyActivationTest.java
@@ -56,7 +56,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Assert;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 
 /**
@@ -101,20 +100,6 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst
     }
 
     /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
-        super.beforeTestsStarted();
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
-    }
-
-    /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
         super.beforeTest();
 
@@ -189,6 +174,7 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst
     public void testBltChangeTopVerRemoveOnlineNodeFails() throws Exception {
         Ignite ignite = startGridWithConsistentId("A");
 
+        ignite.cluster().baselineAutoAdjustEnabled(false);
         ignite.cluster().active(true);
 
         long singleNodeTopVer = ignite.cluster().topologyVersion();
@@ -222,6 +208,7 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst
         Ignite nodeB = startGridWithConsistentId("B");
         Ignite nodeC = startGridWithConsistentId("OnlineConsID");
 
+        nodeC.cluster().baselineAutoAdjustEnabled(false);
         nodeC.cluster().active(true);
 
         boolean expectedExceptionIsThrown = false;
@@ -249,6 +236,7 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst
         startGridWithConsistentId("B");
         Ignite nodeC = startGridWithConsistentId("C");
 
+        nodeC.cluster().baselineAutoAdjustEnabled(false);
         nodeC.active(true);
 
         stopAllGrids(false);
@@ -408,6 +396,7 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst
 
         IgniteEx grid = grid("B");
 
+        grid.cluster().baselineAutoAdjustEnabled(false);
         grid.cluster().active(true);
 
         IgniteCache<Object, Object> cache = grid.getOrCreateCache(CACHE_NAME);
@@ -608,6 +597,7 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst
         startGridWithConsistentId("B");
         Ignite nodeC = startGridWithConsistentId("C");
 
+        nodeA.cluster().baselineAutoAdjustEnabled(false);
         nodeC.cluster().active(true);
 
         stopGrid("B", false);
@@ -663,6 +653,7 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst
         Ignite nodeB = startGridWithConsistentId("B");
         Ignite nodeC = startGridWithConsistentId("C");
 
+        nodeA.cluster().baselineAutoAdjustEnabled(false);
         nodeC.cluster().active(true);
 
         IgniteEx nodeD = (IgniteEx) startGridWithConsistentId("D");
@@ -687,6 +678,7 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst
         Ignite nodeB = startGridWithConsistentId("B");
         Ignite nodeC = startGridWithConsistentId("C");
 
+        nodeA.cluster().baselineAutoAdjustEnabled(false);
         nodeA.cluster().active(true);
 
         nodeA.cluster().setBaselineTopology(null);
@@ -884,6 +876,7 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst
         startGridWithConsistentId("B");
         startGridWithConsistentId("C");
 
+        nodeA.cluster().baselineAutoAdjustEnabled(false);
         nodeA.cluster().active(true);
 
         stopGrid("C", false);
@@ -936,6 +929,7 @@ public class IgniteBaselineAffinityTopologyActivationTest extends GridCommonAbst
         startGridWithConsistentId("B");
         startGridWithConsistentId("C");
 
+        nodeA.cluster().baselineAutoAdjustEnabled(false);
         nodeA.cluster().active(true);
 
         stopGrid("C", false);
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedIndexTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedIndexTest.java
index 28eec74..6e66410 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedIndexTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedIndexTest.java
@@ -16,6 +16,7 @@
  */
 package org.apache.ignite.internal.processors.cache.persistence;
 
+import javax.cache.Cache;
 import java.io.File;
 import java.io.IOException;
 import java.lang.reflect.Field;
@@ -25,7 +26,6 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
-import javax.cache.Cache;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteDataStreamer;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
@@ -46,17 +46,13 @@ import org.apache.ignite.internal.processors.cache.persistence.file.FileIOFactor
 import org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIOFactory;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.ignite.testframework.junits.WithSystemProperty;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.testframework.junits.multijvm.IgniteProcessProxy;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
-
 /**
  * Test to reproduce corrupted indexes problem after partition file eviction and truncation.
  */
-@WithSystemProperty(key = IGNITE_BASELINE_AUTO_ADJUST_ENABLED, value = "false")
 public class IgnitePdsCorruptedIndexTest extends GridCommonAbstractTest {
     /** Cache name. */
     private static final String CACHE = "cache";
@@ -134,6 +130,7 @@ public class IgnitePdsCorruptedIndexTest extends GridCommonAbstractTest {
 
         IgniteEx ignite = startGrid(0);
 
+        ignite.cluster().baselineAutoAdjustEnabled(false);
         haltFileIO = true;
 
         additionalArgs = new ArrayList<>();
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionFilesDestroyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionFilesDestroyTest.java
index e9b58fe..f68e543 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionFilesDestroyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionFilesDestroyTest.java
@@ -47,11 +47,11 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Assert;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.DFLT_STORE_DIR;
 
 /**
- * Test class to check that partition files after eviction are destroyed correctly on next checkpoint or crash recovery.
+ * Test class to check that partition files after eviction are destroyed correctly on next checkpoint or crash
+ * recovery.
  */
 public class IgnitePdsPartitionFilesDestroyTest extends GridCommonAbstractTest {
     /** Partitions count. */
@@ -91,20 +91,6 @@ public class IgnitePdsPartitionFilesDestroyTest extends GridCommonAbstractTest {
     }
 
     /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
-        super.beforeTestsStarted();
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
-    }
-
-    /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
         stopAllGrids();
 
@@ -150,7 +136,7 @@ public class IgnitePdsPartitionFilesDestroyTest extends GridCommonAbstractTest {
         IgniteCache<Integer, Integer> cache = ignite.cache(DEFAULT_CACHE_NAME);
 
         for (int k = 0; k < keysCnt; k++)
-            Assert.assertEquals("node = " + ignite.name() + ", key = " + k, (Integer) (k * multiplier), cache.get(k));
+            Assert.assertEquals("node = " + ignite.name() + ", key = " + k, (Integer)(k * multiplier), cache.get(k));
     }
 
     /**
@@ -160,8 +146,9 @@ public class IgnitePdsPartitionFilesDestroyTest extends GridCommonAbstractTest {
      */
     @Test
     public void testPartitionFileDestroyAfterCheckpoint() throws Exception {
-        IgniteEx crd = (IgniteEx) startGrids(2);
+        IgniteEx crd = (IgniteEx)startGrids(2);
 
+        crd.cluster().baselineAutoAdjustEnabled(false);
         crd.cluster().active(true);
 
         int keysCnt = 50_000;
@@ -183,7 +170,7 @@ public class IgnitePdsPartitionFilesDestroyTest extends GridCommonAbstractTest {
         checkPartitionFiles(crd, false);
 
         for (Ignite ignite : G.allGrids())
-            checkData((IgniteEx) ignite, keysCnt, 1);
+            checkData((IgniteEx)ignite, keysCnt, 1);
     }
 
     /**
@@ -195,6 +182,8 @@ public class IgnitePdsPartitionFilesDestroyTest extends GridCommonAbstractTest {
     public void testPartitionFileDestroyAndRecreate() throws Exception {
         IgniteEx crd = startGrid(0);
 
+        crd.cluster().baselineAutoAdjustEnabled(false);
+
         IgniteEx node = startGrid(1);
 
         crd.cluster().active(true);
@@ -231,7 +220,7 @@ public class IgnitePdsPartitionFilesDestroyTest extends GridCommonAbstractTest {
         checkPartitionFiles(node, false);
 
         for (Ignite ignite : G.allGrids())
-            checkData((IgniteEx) ignite, keysCnt, 2);
+            checkData((IgniteEx)ignite, keysCnt, 2);
     }
 
     /**
@@ -243,6 +232,8 @@ public class IgnitePdsPartitionFilesDestroyTest extends GridCommonAbstractTest {
     public void testPartitionFileDestroyCrashRecovery1() throws Exception {
         IgniteEx crd = startGrid(0);
 
+        crd.cluster().baselineAutoAdjustEnabled(false);
+
         failFileIo = true;
 
         IgniteEx problemNode = startGrid(1);
@@ -288,12 +279,12 @@ public class IgnitePdsPartitionFilesDestroyTest extends GridCommonAbstractTest {
         checkPartitionFiles(problemNode, false);
 
         for (Ignite ignite : G.allGrids())
-            checkData((IgniteEx) ignite, keysCnt, 1);
+            checkData((IgniteEx)ignite, keysCnt, 1);
     }
 
     /**
-     * Test that partitions files are not deleted if they were re-created on next time
-     * and no checkpoint has done during this time.
+     * Test that partitions files are not deleted if they were re-created on next time and no checkpoint has done during
+     * this time.
      *
      * @throws Exception If failed.
      */
@@ -301,6 +292,8 @@ public class IgnitePdsPartitionFilesDestroyTest extends GridCommonAbstractTest {
     public void testPartitionFileDestroyCrashRecovery2() throws Exception {
         IgniteEx crd = startGrid(0);
 
+        crd.cluster().baselineAutoAdjustEnabled(false);
+
         failFileIo = true;
 
         IgniteEx problemNode = startGrid(1);
@@ -355,7 +348,7 @@ public class IgnitePdsPartitionFilesDestroyTest extends GridCommonAbstractTest {
         checkPartitionFiles(problemNode, false);
 
         for (Ignite ignite : G.allGrids())
-            checkData((IgniteEx) ignite, keysCnt, 1);
+            checkData((IgniteEx)ignite, keysCnt, 1);
     }
 
     /**
@@ -365,7 +358,7 @@ public class IgnitePdsPartitionFilesDestroyTest extends GridCommonAbstractTest {
      */
     @Test
     public void testDestroyWhenPartitionsAreEmpty() throws Exception {
-        IgniteEx crd = (IgniteEx) startGrids(2);
+        IgniteEx crd = (IgniteEx)startGrids(2);
 
         crd.cluster().active(true);
 
@@ -387,15 +380,14 @@ public class IgnitePdsPartitionFilesDestroyTest extends GridCommonAbstractTest {
     }
 
     /**
-     * If {@code exists} is {@code true}, checks that all partition files exist
-     * if partition has state EVICTED.
+     * If {@code exists} is {@code true}, checks that all partition files exist if partition has state EVICTED.
      *
-     * If {@code exists} is {@code false}, checks that all partition files don't exist
-     * if partition is absent or has state EVICTED.
+     * If {@code exists} is {@code false}, checks that all partition files don't exist if partition is absent or has
+     * state EVICTED.
      *
      * @param ignite Node.
-     * @param exists If {@code true} method will check that partition file exists,
-     *               in other case will check that file doesn't exist.
+     * @param exists If {@code true} method will check that partition file exists, in other case will check that file
+     * doesn't exist.
      * @throws IgniteCheckedException If failed.
      */
     private void checkPartitionFiles(IgniteEx ignite, boolean exists) throws IgniteCheckedException {
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteRebalanceScheduleResendPartitionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteRebalanceScheduleResendPartitionsTest.java
index 0259c68..13bec22 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteRebalanceScheduleResendPartitionsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgniteRebalanceScheduleResendPartitionsTest.java
@@ -49,7 +49,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Assert;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.testframework.GridTestUtils.runAsync;
 
 /**
@@ -86,20 +85,6 @@ public class IgniteRebalanceScheduleResendPartitionsTest extends GridCommonAbstr
     }
 
     /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
-        super.beforeTestsStarted();
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
-    }
-
-    /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
         super.beforeTest();
 
@@ -124,6 +109,7 @@ public class IgniteRebalanceScheduleResendPartitionsTest extends GridCommonAbstr
     public void test() throws Exception {
         Ignite ig0 = startGrids(3);
 
+        ig0.cluster().baselineAutoAdjustEnabled(false);
         ig0.cluster().active(true);
 
         int entries = 100_000;
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWalModeChangeDuringRebalancingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWalModeChangeDuringRebalancingSelfTest.java
index 1bb19cd..5e60530 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWalModeChangeDuringRebalancingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/LocalWalModeChangeDuringRebalancingSelfTest.java
@@ -63,7 +63,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Assert;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.testframework.GridTestUtils.waitForCondition;
 
 /**
@@ -175,8 +174,6 @@ public class LocalWalModeChangeDuringRebalancingSelfTest extends GridCommonAbstr
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
         super.beforeTestsStarted();
 
         cleanPersistenceDir();
@@ -220,8 +217,6 @@ public class LocalWalModeChangeDuringRebalancingSelfTest extends GridCommonAbstr
         System.clearProperty(IgniteSystemProperties.IGNITE_DISABLE_WAL_DURING_REBALANCING);
 
         System.clearProperty(IgniteSystemProperties.IGNITE_PENDING_TX_TRACKER_ENABLED);
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
     }
 
     /**
@@ -255,6 +250,7 @@ public class LocalWalModeChangeDuringRebalancingSelfTest extends GridCommonAbstr
     private void doTestSimple() throws Exception {
         Ignite ignite = startGrids(3);
 
+        ignite.cluster().baselineAutoAdjustEnabled(false);
         ignite.cluster().active(true);
 
         IgniteCache<Integer, Integer> cache = ignite.cache(DEFAULT_CACHE_NAME);
@@ -333,6 +329,7 @@ public class LocalWalModeChangeDuringRebalancingSelfTest extends GridCommonAbstr
 
         Ignite ignite = startGrids(3);
 
+        ignite.cluster().baselineAutoAdjustEnabled(false);
         ignite.cluster().active(true);
 
         ignite.cluster().setBaselineTopology(3);
@@ -387,6 +384,7 @@ public class LocalWalModeChangeDuringRebalancingSelfTest extends GridCommonAbstr
     public void testLocalAndGlobalWalStateInterdependence() throws Exception {
         Ignite ignite = startGrids(3);
 
+        ignite.cluster().baselineAutoAdjustEnabled(false);
         ignite.cluster().active(true);
 
         IgniteCache<Integer, Integer> cache = ignite.cache(DEFAULT_CACHE_NAME);
@@ -500,6 +498,7 @@ public class LocalWalModeChangeDuringRebalancingSelfTest extends GridCommonAbstr
     private void doTestParallelExchange(AtomicReference<CountDownLatch> latchRef) throws Exception {
         Ignite ignite = startGrids(3);
 
+        ignite.cluster().baselineAutoAdjustEnabled(false);
         ignite.cluster().active(true);
 
         IgniteCache<Integer, Integer> cache = ignite.cache(DEFAULT_CACHE_NAME);
@@ -549,6 +548,7 @@ public class LocalWalModeChangeDuringRebalancingSelfTest extends GridCommonAbstr
     public void testDataClearedAfterRestartWithDisabledWal() throws Exception {
         Ignite ignite = startGrid(0);
 
+        ignite.cluster().baselineAutoAdjustEnabled(false);
         ignite.cluster().active(true);
 
         IgniteCache<Integer, Integer> cache = ignite.cache(DEFAULT_CACHE_NAME);
@@ -598,6 +598,7 @@ public class LocalWalModeChangeDuringRebalancingSelfTest extends GridCommonAbstr
     public void testWalNotDisabledAfterShrinkingBaselineTopology() throws Exception {
         Ignite ignite = startGrids(4);
 
+        ignite.cluster().baselineAutoAdjustEnabled(false);
         ignite.cluster().active(true);
 
         IgniteCache<Integer, Integer> cache = ignite.cache(DEFAULT_CACHE_NAME);
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/ClientAffinityAssignmentWithBaselineTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/ClientAffinityAssignmentWithBaselineTest.java
index 7788193..47937d3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/ClientAffinityAssignmentWithBaselineTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/ClientAffinityAssignmentWithBaselineTest.java
@@ -16,6 +16,7 @@
 */
 package org.apache.ignite.internal.processors.cache.persistence.baseline;
 
+import javax.cache.CacheException;
 import java.io.File;
 import java.io.Serializable;
 import java.util.ArrayList;
@@ -31,7 +32,6 @@ import java.util.concurrent.ThreadLocalRandom;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicReference;
 import java.util.concurrent.locks.LockSupport;
-import javax.cache.CacheException;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
@@ -58,7 +58,6 @@ import org.apache.ignite.transactions.TransactionIsolation;
 import org.junit.Ignore;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.DFLT_STORE_DIR;
 
 /**
@@ -160,20 +159,6 @@ public class ClientAffinityAssignmentWithBaselineTest extends GridCommonAbstract
     }
 
     /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
-        super.beforeTestsStarted();
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
-    }
-
-    /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
         stopAllGrids();
 
@@ -287,6 +272,7 @@ public class ClientAffinityAssignmentWithBaselineTest extends GridCommonAbstract
     private void testChangingBaselineDown(String cacheName, boolean lateActivation) throws Exception {
         IgniteEx ig0 = (IgniteEx)startGrids(DEFAULT_NODES_COUNT);
 
+        ig0.cluster().baselineAutoAdjustEnabled(false);
         IgniteEx client1 = null;
         IgniteEx client2 = null;
 
@@ -423,6 +409,7 @@ public class ClientAffinityAssignmentWithBaselineTest extends GridCommonAbstract
     public void testCrossCacheTxs() throws Exception {
         IgniteEx ig0 = (IgniteEx)startGrids(DEFAULT_NODES_COUNT);
 
+        ig0.cluster().baselineAutoAdjustEnabled(false);
         ig0.cluster().active(true);
 
         AtomicBoolean stopLoad = new AtomicBoolean(false);
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteAbsentEvictionNodeOutOfBaselineTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteAbsentEvictionNodeOutOfBaselineTest.java
index 221d214..849e667 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteAbsentEvictionNodeOutOfBaselineTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteAbsentEvictionNodeOutOfBaselineTest.java
@@ -29,8 +29,6 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.topology.Grid
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
-
 /**
  * Test absenting eviction for joined node if it is out of baseline.
  */
@@ -73,14 +71,10 @@ public class IgniteAbsentEvictionNodeOutOfBaselineTest extends GridCommonAbstrac
         stopAllGrids();
 
         cleanPersistenceDir();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
     }
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
         super.beforeTestsStarted();
     }
 
@@ -92,6 +86,7 @@ public class IgniteAbsentEvictionNodeOutOfBaselineTest extends GridCommonAbstrac
         //given: start 3 nodes with data
         Ignite ignite0 = startGrids(3);
 
+        ignite0.cluster().baselineAutoAdjustEnabled(false);
         ignite0.cluster().active(true);
 
         IgniteCache<Object, Object> cache = ignite0.getOrCreateCache(TEST_CACHE_NAME);
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteChangingBaselineDownCachePutAllFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteChangingBaselineDownCachePutAllFailoverTest.java
index ab8604e..3b89d31 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteChangingBaselineDownCachePutAllFailoverTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteChangingBaselineDownCachePutAllFailoverTest.java
@@ -32,8 +32,6 @@ import org.apache.ignite.internal.processors.cache.distributed.CachePutAllFailov
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.testframework.GridTestUtils;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
-
 /**
  * Failover test for cache putAll operations when BaselineTopology is changed down
  * (existing node gets stopped and removed from BaselineTopology).
@@ -62,8 +60,6 @@ public class IgniteChangingBaselineDownCachePutAllFailoverTest extends CachePutA
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
         cleanPersistenceDir();
     }
 
@@ -73,6 +69,7 @@ public class IgniteChangingBaselineDownCachePutAllFailoverTest extends CachePutA
 
         startGrids(GRIDS_COUNT);
 
+        grid(0).cluster().baselineAutoAdjustEnabled(false);
         grid(0).active(true);
 
         awaitPartitionMapExchange();
@@ -88,8 +85,6 @@ public class IgniteChangingBaselineDownCachePutAllFailoverTest extends CachePutA
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         cleanPersistenceDir();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
     }
 
     /** {@inheritDoc} */
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteChangingBaselineDownCacheRemoveFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteChangingBaselineDownCacheRemoveFailoverTest.java
index 7c3d992..609180d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteChangingBaselineDownCacheRemoveFailoverTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteChangingBaselineDownCacheRemoveFailoverTest.java
@@ -37,7 +37,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheAbstractRemoveFailur
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.testframework.GridTestUtils;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 
@@ -83,8 +82,6 @@ public class IgniteChangingBaselineDownCacheRemoveFailoverTest extends GridCache
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
         cleanPersistenceDir();
     }
 
@@ -96,6 +93,7 @@ public class IgniteChangingBaselineDownCacheRemoveFailoverTest extends GridCache
 
         startGrid(GRIDS_COUNT);
 
+        grid(0).cluster().baselineAutoAdjustEnabled(false);
         grid(0).active(true);
 
         awaitPartitionMapExchange();
@@ -104,8 +102,6 @@ public class IgniteChangingBaselineDownCacheRemoveFailoverTest extends GridCache
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         cleanPersistenceDir();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
     }
 
     /** {@inheritDoc} */
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteChangingBaselineUpCachePutAllFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteChangingBaselineUpCachePutAllFailoverTest.java
index e40334c..d29f4c9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteChangingBaselineUpCachePutAllFailoverTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteChangingBaselineUpCachePutAllFailoverTest.java
@@ -31,8 +31,6 @@ import org.apache.ignite.internal.processors.cache.distributed.CachePutAllFailov
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.testframework.GridTestUtils;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
-
 /**
  * Failover test for cache putAll operations when BaselineTopology is changed up
  * (new node is added to BaselineTopology).
@@ -61,8 +59,6 @@ public class IgniteChangingBaselineUpCachePutAllFailoverTest extends CachePutAll
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
         cleanPersistenceDir();
     }
 
@@ -72,6 +68,7 @@ public class IgniteChangingBaselineUpCachePutAllFailoverTest extends CachePutAll
 
         startGrids(GRIDS_COUNT);
 
+        grid(0).cluster().baselineAutoAdjustEnabled(false);
         grid(0).active(true);
 
         awaitPartitionMapExchange();
@@ -87,8 +84,6 @@ public class IgniteChangingBaselineUpCachePutAllFailoverTest extends CachePutAll
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         cleanPersistenceDir();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
     }
 
     /** {@inheritDoc} */
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteChangingBaselineUpCacheRemoveFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteChangingBaselineUpCacheRemoveFailoverTest.java
index 4730c0b..560e85b7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteChangingBaselineUpCacheRemoveFailoverTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteChangingBaselineUpCacheRemoveFailoverTest.java
@@ -37,7 +37,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheAbstractRemoveFailur
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.testframework.GridTestUtils;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 
@@ -82,8 +81,6 @@ public class IgniteChangingBaselineUpCacheRemoveFailoverTest extends GridCacheAb
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
         cleanPersistenceDir();
     }
 
@@ -101,8 +98,6 @@ public class IgniteChangingBaselineUpCacheRemoveFailoverTest extends GridCacheAb
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         cleanPersistenceDir();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
     }
 
     /** {@inheritDoc} */
@@ -126,6 +121,8 @@ public class IgniteChangingBaselineUpCacheRemoveFailoverTest extends GridCacheAb
 
                 IgniteEx ig0 = grid(0);
 
+                ig0.cluster().baselineAutoAdjustEnabled(false);
+
                 ig0.cluster().setBaselineTopology(baselineNodes(ig0.cluster().forServers().nodes()));
 
                 while (!stop.get()) {
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgniteLogicalRecoveryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgniteLogicalRecoveryTest.java
index 3c6806c..8cc7c3f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgniteLogicalRecoveryTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgniteLogicalRecoveryTest.java
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.internal.processors.cache.persistence.db;
 
-import com.google.common.collect.Lists;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -29,6 +28,7 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ThreadLocalRandom;
 import java.util.function.Predicate;
 import java.util.stream.Collectors;
+import com.google.common.collect.Lists;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteIllegalStateException;
@@ -63,8 +63,6 @@ import org.jetbrains.annotations.Nullable;
 import org.junit.Assert;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
-
 /**
  * A set of tests that check correctness of logical recovery performed during node start.
  */
@@ -128,16 +126,12 @@ public class IgniteLogicalRecoveryTest extends GridCommonAbstractTest {
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
         super.beforeTestsStarted();
     }
 
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
     }
 
     /**
@@ -324,6 +318,7 @@ public class IgniteLogicalRecoveryTest extends GridCommonAbstractTest {
     public void testRecoveryOnJoinToDifferentBlt() throws Exception {
         IgniteEx crd = (IgniteEx) startGridsMultiThreaded(3);
 
+        crd.cluster().baselineAutoAdjustEnabled(false);
         crd.cluster().active(true);
 
         IgniteEx node = grid(2);
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheWalDisabledOnRebalancingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheWalDisabledOnRebalancingTest.java
index 6d80424..7183e65 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheWalDisabledOnRebalancingTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheWalDisabledOnRebalancingTest.java
@@ -54,8 +54,6 @@ import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
-
 /**
  * Test scenarios with rebalancing, IGNITE_DISABLE_WAL_DURING_REBALANCING optimization and topology changes
  * such as client nodes join/leave, server nodes from BLT leave/join, server nodes out of BLT join/leave.
@@ -92,20 +90,6 @@ public class IgnitePdsCacheWalDisabledOnRebalancingTest extends GridCommonAbstra
     private boolean useBlockingFileIO;
 
     /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
-        super.beforeTestsStarted();
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
-    }
-
-    /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
         super.beforeTest();
 
@@ -291,6 +275,8 @@ public class IgnitePdsCacheWalDisabledOnRebalancingTest extends GridCommonAbstra
     @Test
     public void testRebalancedPartitionsOwningWithConcurrentAffinityChange() throws Exception {
         Ignite ig0 = startGridsMultiThreaded(4);
+
+        ig0.cluster().baselineAutoAdjustEnabled(false);
         fillCache(ig0.dataStreamer(CACHE3_NAME), CACHE_SIZE, GENERATING_FUNC);
 
         // Stop idx=2 to prepare for baseline topology change later.
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java
index b398623..3da0c18 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java
@@ -49,7 +49,6 @@ import org.junit.Assert;
 import org.junit.Test;
 
 import static java.nio.file.Files.newDirectoryStream;
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.configuration.DataStorageConfiguration.DFLT_DATA_REG_DEFAULT_NAME;
 import static org.apache.ignite.internal.processors.cache.GridCacheUtils.UTILITY_CACHE_NAME;
 import static org.apache.ignite.internal.processors.cache.mvcc.txlog.TxLog.TX_LOG_CACHE_NAME;
@@ -103,16 +102,12 @@ public class IgnitePdsDataRegionMetricsTest extends GridCommonAbstractTest {
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
         super.beforeTestsStarted();
     }
 
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
     }
 
     /**
@@ -190,6 +185,7 @@ public class IgnitePdsDataRegionMetricsTest extends GridCommonAbstractTest {
         IgniteEx node0 = startGrid(0);
         IgniteEx node1 = startGrid(1);
 
+        node0.cluster().baselineAutoAdjustEnabled(false);
         node0.cluster().active(true);
 
         final IgniteCache<Integer, String> cache = node0.cache(DEFAULT_CACHE_NAME);
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWithTtlTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWithTtlTest.java
index e04f2a5..7bc5ec7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWithTtlTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWithTtlTest.java
@@ -17,12 +17,12 @@
 
 package org.apache.ignite.internal.processors.cache.persistence.db;
 
-import java.util.TreeMap;
-import java.util.concurrent.TimeUnit;
 import javax.cache.expiry.AccessedExpiryPolicy;
 import javax.cache.expiry.CreatedExpiryPolicy;
 import javax.cache.expiry.Duration;
 import javax.cache.expiry.ExpiryPolicy;
+import java.util.TreeMap;
+import java.util.concurrent.TimeUnit;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteSystemProperties;
@@ -51,8 +51,6 @@ import org.apache.ignite.testframework.junits.WithSystemProperty;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
-
 /**
  * Test TTL worker with persistence enabled
  */
@@ -75,16 +73,12 @@ public class IgnitePdsWithTtlTest extends GridCommonAbstractTest {
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
         super.beforeTestsStarted();
     }
 
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
     }
 
     /** {@inheritDoc} */
@@ -219,6 +213,8 @@ public class IgnitePdsWithTtlTest extends GridCommonAbstractTest {
     @Test
     public void testRebalancingWithTtlExpirable() throws Exception {
         IgniteEx srv = startGrid(0);
+
+        srv.cluster().baselineAutoAdjustEnabled(false);
         srv.cluster().active(true);
 
         fillCache(srv.cache(CACHE_NAME));
@@ -246,6 +242,9 @@ public class IgnitePdsWithTtlTest extends GridCommonAbstractTest {
     public void testStartStopAfterRebalanceWithTtlExpirable() throws Exception {
         try {
             IgniteEx srv = startGrid(0);
+
+            srv.cluster().baselineAutoAdjustEnabled(false);
+
             startGrid(1);
             srv.cluster().active(true);
 
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/SlowHistoricalRebalanceSmallHistoryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/SlowHistoricalRebalanceSmallHistoryTest.java
index cbd8a1b..e9df603 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/SlowHistoricalRebalanceSmallHistoryTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/SlowHistoricalRebalanceSmallHistoryTest.java
@@ -43,8 +43,6 @@ import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
-
 /**
  *
  */
@@ -113,16 +111,12 @@ public class SlowHistoricalRebalanceSmallHistoryTest extends GridCommonAbstractT
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
         super.beforeTestsStarted();
     }
 
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
     }
 
     /**
@@ -132,6 +126,7 @@ public class SlowHistoricalRebalanceSmallHistoryTest extends GridCommonAbstractT
     public void testReservation() throws Exception {
         IgniteEx ig = startGrid(0);
 
+        ig.cluster().baselineAutoAdjustEnabled(false);
         ig.cluster().active(true);
 
         ig.getOrCreateCache(new CacheConfiguration<>(SLOW_REBALANCE_CACHE)
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java
index 8d98026..73ade70 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java
@@ -87,8 +87,6 @@ import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
-
 /**
  * Test simulated checkpoints, Disables integrated check pointer thread
  */
@@ -134,20 +132,6 @@ public class IgnitePdsCheckpointSimulationWithRealCpDisabledTest extends GridCom
     }
 
     /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        super.beforeTestsStarted();
-
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
-    }
-
-    /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
         stopAllGrids();
 
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java
index 59f6bc0..58ea990 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushMultiNodeFailoverAbstractSelfTest.java
@@ -50,7 +50,6 @@ import org.apache.ignite.transactions.TransactionIsolation;
 import org.junit.Assume;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
 
@@ -95,16 +94,12 @@ public abstract class IgniteWalFlushMultiNodeFailoverAbstractSelfTest extends Gr
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
         super.beforeTestsStarted();
     }
 
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
     }
 
     /** {@inheritDoc} */
@@ -181,6 +176,7 @@ public abstract class IgniteWalFlushMultiNodeFailoverAbstractSelfTest extends Gr
     private void failWhilePut(boolean failWhileStart) throws Exception {
         Ignite ig = startGrids(gridCount());
 
+        ig.cluster().baselineAutoAdjustEnabled(false);
         ig.cluster().active(true);
 
         IgniteCache<Object, Object> cache = ig.cache(DEFAULT_CACHE_NAME);
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java
index 1018f9e..9ef9363 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java
@@ -48,8 +48,6 @@ import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
-
 /**
  *
  */
@@ -106,16 +104,12 @@ public class WalCompactionTest extends GridCommonAbstractTest {
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
         super.beforeTestsStarted();
     }
 
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
     }
 
     /** {@inheritDoc} */
@@ -162,6 +156,8 @@ public class WalCompactionTest extends GridCommonAbstractTest {
      */
     private void testApplyingUpdatesFromCompactedWal(boolean switchOffCompressor) throws Exception {
         IgniteEx ig = (IgniteEx)startGrids(3);
+
+        ig.cluster().baselineAutoAdjustEnabled(false);
         ig.cluster().active(true);
 
         IgniteCache<Integer, byte[]> cache = ig.cache(CACHE_NAME);
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/PartitionUpdateCounterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/PartitionUpdateCounterTest.java
index 4d084ae..3ad0049 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/PartitionUpdateCounterTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/PartitionUpdateCounterTest.java
@@ -29,7 +29,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.LongAdder;
 import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
@@ -41,10 +40,9 @@ import org.apache.ignite.configuration.WALMode;
 import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.processors.cache.PartitionAtomicUpdateCounterImpl;
-import org.apache.ignite.internal.processors.cache.PartitionUpdateCounter;
 import org.apache.ignite.internal.processors.cache.PartitionTxUpdateCounterImpl;
+import org.apache.ignite.internal.processors.cache.PartitionUpdateCounter;
 import org.apache.ignite.internal.util.typedef.X;
-import org.apache.ignite.testframework.junits.WithSystemProperty;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Test;
 
@@ -334,7 +332,6 @@ public class PartitionUpdateCounterTest extends GridCommonAbstractTest {
      *
      */
     @Test
-    @WithSystemProperty(key = IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED, value = "false")
     public void testWithPersistentNodeTx() throws Exception {
         testWithPersistentNode(CacheAtomicityMode.TRANSACTIONAL);
     }
@@ -343,7 +340,6 @@ public class PartitionUpdateCounterTest extends GridCommonAbstractTest {
      *
      */
     @Test
-    @WithSystemProperty(key = IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED, value = "false")
     public void testWithPersistentNodeAtomic() throws Exception {
         testWithPersistentNode(CacheAtomicityMode.ATOMIC);
     }
@@ -356,6 +352,8 @@ public class PartitionUpdateCounterTest extends GridCommonAbstractTest {
 
         try {
             IgniteEx grid0 = startGrid(0);
+
+            grid0.cluster().baselineAutoAdjustEnabled(false);
             grid0.cluster().active(true);
             grid0.cluster().baselineAutoAdjustEnabled(false);
 
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxCrossCachePartitionConsistencyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxCrossCachePartitionConsistencyTest.java
index 93c352c..d3c67a2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxCrossCachePartitionConsistencyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxCrossCachePartitionConsistencyTest.java
@@ -26,7 +26,6 @@ import java.util.stream.IntStream;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteDataStreamer;
-import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.cluster.ClusterTopologyException;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -37,7 +36,6 @@ import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager;
 import org.apache.ignite.internal.util.typedef.X;
-import org.apache.ignite.testframework.junits.WithSystemProperty;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.transactions.Transaction;
 import org.apache.ignite.transactions.TransactionRollbackException;
@@ -59,7 +57,6 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
  *
  * Success: partitions are consistent, total balances invariant is held.
  */
-@WithSystemProperty(key = IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED, value = "false")
 public class TxCrossCachePartitionConsistencyTest extends GridCommonAbstractTest {
     /** Cache 1. */
     private static final String CACHE1 = DEFAULT_CACHE_NAME;
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPartitionCounterStateAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPartitionCounterStateAbstractTest.java
index 773ddde..3ceb49f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPartitionCounterStateAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPartitionCounterStateAbstractTest.java
@@ -80,7 +80,6 @@ import org.jetbrains.annotations.Nullable;
 import static java.util.concurrent.TimeUnit.DAYS;
 import static java.util.concurrent.TimeUnit.MILLISECONDS;
 import static java.util.stream.Collectors.toCollection;
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 import static org.apache.ignite.configuration.WALMode.LOG_ONLY;
@@ -166,8 +165,6 @@ public abstract class TxPartitionCounterStateAbstractTest extends GridCommonAbst
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
     }
 
     /** */
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPartitionCounterStateConsistencyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPartitionCounterStateConsistencyTest.java
index 32e2ad6..5011601 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPartitionCounterStateConsistencyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPartitionCounterStateConsistencyTest.java
@@ -34,7 +34,6 @@ import java.util.concurrent.atomic.LongAdder;
 import java.util.function.BooleanSupplier;
 import java.util.function.Consumer;
 import java.util.stream.IntStream;
-
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteCheckedException;
@@ -805,6 +804,9 @@ public class TxPartitionCounterStateConsistencyTest extends TxPartitionCounterSt
         rndAddrsField.set(customDiscoSpi, true);
 
         Ignite crd = startGrid(0); // Start coordinator with custom discovery SPI.
+
+        crd.cluster().baselineAutoAdjustEnabled(false);
+
         IgniteEx g1 = startGrid(1);
         startGrid(2);
 
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cluster/BaselineAutoAdjustTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cluster/BaselineAutoAdjustTest.java
index a4fddbb..60291df 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cluster/BaselineAutoAdjustTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cluster/BaselineAutoAdjustTest.java
@@ -39,7 +39,6 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.testframework.GridTestUtils.waitForCondition;
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
@@ -66,8 +65,7 @@ public class BaselineAutoAdjustTest extends GridCommonAbstractTest {
     public void before() throws Exception {
         stopAllGrids();
 
-        if (isPersistent())
-            cleanPersistenceDir();
+        cleanPersistenceDir();
 
         autoAdjustTimeout = 5000;
     }
@@ -79,8 +77,7 @@ public class BaselineAutoAdjustTest extends GridCommonAbstractTest {
     public void after() throws Exception {
         stopAllGrids();
 
-        if (isPersistent())
-            cleanPersistenceDir();
+        cleanPersistenceDir();
     }
 
     /** {@inheritDoc} */
@@ -116,6 +113,8 @@ public class BaselineAutoAdjustTest extends GridCommonAbstractTest {
     public void testBaselineAutoAdjustAfterNodeLeft() throws Exception {
         Ignite ignite0 = startGrids(2);
 
+        ignite0.cluster().baselineAutoAdjustEnabled(true);
+
         ignite0.cluster().active(true);
 
         ignite0.cluster().baselineAutoAdjustTimeout(autoAdjustTimeout);
@@ -145,6 +144,8 @@ public class BaselineAutoAdjustTest extends GridCommonAbstractTest {
     public void testBaselineAutoAdjustSinceSecondNodeLeft() throws Exception {
         Ignite ignite0 = startGrids(3);
 
+        ignite0.cluster().baselineAutoAdjustEnabled(true);
+
         ignite0.cluster().active(true);
 
         ignite0.cluster().baselineAutoAdjustTimeout(autoAdjustTimeout);
@@ -180,6 +181,8 @@ public class BaselineAutoAdjustTest extends GridCommonAbstractTest {
     public void testBaselineAutoAdjustSinceCoordinatorLeft() throws Exception {
         Ignite ignite0 = startGrids(3);
 
+        ignite0.cluster().baselineAutoAdjustEnabled(true);
+
         ignite0.cluster().active(true);
 
         ignite0.cluster().baselineAutoAdjustTimeout(autoAdjustTimeout);
@@ -217,6 +220,8 @@ public class BaselineAutoAdjustTest extends GridCommonAbstractTest {
     public void testBaselineAutoAdjustAfterNodeJoin() throws Exception {
         IgniteEx ignite0 = startGrid(0);
 
+        ignite0.cluster().baselineAutoAdjustEnabled(true);
+
         ignite0.cluster().active(true);
 
         ignite0.cluster().baselineAutoAdjustTimeout(autoAdjustTimeout);
@@ -292,6 +297,8 @@ public class BaselineAutoAdjustTest extends GridCommonAbstractTest {
     public void testBaselineAutoAdjustThrowExceptionWhenBaselineChangedManually() throws Exception {
         Ignite ignite0 = startGrids(2);
 
+        ignite0.cluster().baselineAutoAdjustEnabled(true);
+
         ignite0.cluster().active(true);
 
         ignite0.cluster().baselineAutoAdjustTimeout(autoAdjustTimeout);
@@ -316,6 +323,8 @@ public class BaselineAutoAdjustTest extends GridCommonAbstractTest {
 
         Ignite ignite0 = startGrids(3);
 
+        ignite0.cluster().baselineAutoAdjustEnabled(true);
+
         ignite0.cluster().active(true);
 
         ignite0.cluster().baselineAutoAdjustTimeout(autoAdjustTimeout);
@@ -354,6 +363,9 @@ public class BaselineAutoAdjustTest extends GridCommonAbstractTest {
     @Test
     public void testBaselineAutoAdjustIgnoreClientNodes() throws Exception {
         IgniteEx ignite0 = startGrid(0);
+
+        ignite0.cluster().baselineAutoAdjustEnabled(true);
+
         startGrid(1);
 
         ignite0.cluster().active(true);
@@ -382,10 +394,10 @@ public class BaselineAutoAdjustTest extends GridCommonAbstractTest {
     public void testBaselineAutoAdjustDisableByDefaultBecauseNotNewCluster() throws Exception {
         assumeTrue(isPersistent());
 
-        //It emulate working cluster before auto-adjust feature was available.
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-        try {
+        {
+            //It emulate working cluster before auto-adjust feature was available.
             Ignite ignite0 = startGrids(2);
+            ignite0.cluster().baselineAutoAdjustEnabled(false);
 
             //This activation guarantee that baseline would be set.
             ignite0.cluster().active(true);
@@ -394,9 +406,6 @@ public class BaselineAutoAdjustTest extends GridCommonAbstractTest {
 
             stopAllGrids();
         }
-        finally {
-            System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
-        }
 
         //Auto-activation is expected. Not first activation should be detected.
         Ignite ignite0 = startGrids(2);
@@ -459,11 +468,15 @@ public class BaselineAutoAdjustTest extends GridCommonAbstractTest {
     public void shouldJoinSuccessBecauseCoordinatorIsPersistent() throws Exception {
         IgniteEx ignite0 = startGrid(persistentRegionConfiguration(0));
 
+        ignite0.cluster().baselineAutoAdjustEnabled(true);
+
         ignite0.cluster().active(true);
 
         startGrid(inMemoryConfiguration(1));
 
         startGrid(persistentRegionConfiguration(2));
+
+        assertEquals(3, ignite0.cluster().nodes().size());
     }
 
     /**
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedConfigurationAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedConfigurationAbstractTest.java
index 664eed2..76f00e9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedConfigurationAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedConfigurationAbstractTest.java
@@ -23,14 +23,14 @@ import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Test;
 
-import static org.junit.Assume.assumeTrue;
+import static org.apache.ignite.internal.processors.configuration.distributed.DistributedLongProperty.detachedLongProperty;
 
 /**
  *
  */
 public abstract class DistributedConfigurationAbstractTest extends GridCommonAbstractTest {
     /** */
-    private static final String TEST_PROP = "someLong";
+    static final String TEST_PROP = "someLong";
 
     /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
@@ -78,82 +78,13 @@ public abstract class DistributedConfigurationAbstractTest extends GridCommonAbs
      * @throws Exception If failed.
      */
     @Test
-    public void testSuccessClusterWideUpdate() throws Exception {
-        assumeTrue(isPersistent());
-
-        IgniteEx ignite0 = startGrid(0);
-        IgniteEx ignite1 = startGrid(1);
-
-        ignite0.cluster().active(true);
-
-        DistributedLongProperty long0 = ignite0.context().distributedConfiguration().registerLong(TEST_PROP);
-        DistributedLongProperty long1 = ignite1.context().distributedConfiguration().registerLong(TEST_PROP);
-
-        long0.propagate(0L);
-
-        assertEquals(0, long0.get().longValue());
-        assertEquals(0, long1.get().longValue());
-
-        assertTrue(long0.propagate(2L));
-
-        //Value changed on whole grid.
-        assertEquals(2L, long0.get().longValue());
-        assertEquals(2L, long1.get().longValue());
-
-        stopAllGrids();
-
-        ignite0 = startGrid(0);
-        ignite1 = startGrid(1);
-
-        ignite0.cluster().active(true);
-
-        long0 = ignite0.context().distributedConfiguration().registerLong(TEST_PROP);
-        long1 = ignite1.context().distributedConfiguration().registerLong(TEST_PROP);
-
-        assertEquals(2, long0.get().longValue());
-        assertEquals(2, long1.get().longValue());
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    @Test
-    public void testReadLocalValueOnInactiveGrid() throws Exception {
-        assumeTrue(isPersistent());
-
-        IgniteEx ignite0 = startGrid(0);
-        startGrid(1);
-
-        ignite0.cluster().active(true);
-
-        DistributedLongProperty long0 = ignite0.context().distributedConfiguration().registerLong(TEST_PROP);
-
-        long0.propagate(0L);
-
-        assertEquals(0, long0.get().longValue());
-
-        assertTrue(long0.propagate(2L));
-
-        stopAllGrids();
-
-        ignite0 = startGrid(0);
-
-        long0 = ignite0.context().distributedConfiguration().registerLong(TEST_PROP);
-
-        assertEquals(2, long0.get().longValue());
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    @Test
     public void testRegisterExistedProperty() throws Exception {
         IgniteEx ignite0 = startGrid(0);
         IgniteEx ignite1 = startGrid(1);
 
         ignite0.cluster().active(true);
 
-        DistributedLongProperty long0 = ignite0.context().distributedConfiguration().registerLong(TEST_PROP);
+        DistributedProperty<Long> long0 = distr(ignite0).registerProperty(detachedLongProperty(TEST_PROP));
 
         long0.propagate(0L);
 
@@ -161,7 +92,7 @@ public abstract class DistributedConfigurationAbstractTest extends GridCommonAbs
 
         assertTrue(long0.propagate(2L));
 
-        DistributedLongProperty long1 = ignite1.context().distributedConfiguration().registerLong(TEST_PROP);
+        DistributedProperty<Long> long1 = distr(ignite1).registerProperty(detachedLongProperty(TEST_PROP));
 
         //Already changed to 2.
         assertEquals(2, long1.get().longValue());
@@ -172,60 +103,13 @@ public abstract class DistributedConfigurationAbstractTest extends GridCommonAbs
      */
     @Test(expected = DetachedPropertyException.class)
     public void testNotAttachedProperty() throws Exception {
-        DistributedLongProperty long0 = DistributedLongProperty.detachedLongProperty(TEST_PROP);
+        DistributedLongProperty long0 = detachedLongProperty(TEST_PROP);
 
         long0.propagate(1L);
     }
 
-    /**
-     * @throws Exception If failed.
-     */
-    @Test
-    public void testPropagateValueOnInactiveGridShouldNotThrowException() throws Exception {
-        assumeTrue(isPersistent());
-
-        IgniteEx ignite0 = (IgniteEx)startGrids(2);
-
-        DistributedLongProperty long0 = ignite0.context().distributedConfiguration().registerLong(TEST_PROP);
-
-        long0.propagate(2L);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    @Test
-    public void testRegisterPropertyBeforeOnReadyForReadHappened() throws Exception {
-        assumeTrue(isPersistent());
-
-        IgniteEx ignite0 = startGrid(0);
-        IgniteEx ignite1 = startGrid(1);
-
-        ignite0.cluster().active(true);
-
-        DistributedLongProperty long0 = ignite0.context().distributedConfiguration().registerLong(TEST_PROP);
-
-        long0.propagate(0L);
-
-        assertEquals(0, long0.get().longValue());
-
-        long0.propagate(2L);
-
-        stopAllGrids();
-
-        TestDistibutedConfigurationPlugin.supplier = (ctx) -> {
-            ctx.distributedConfiguration().registerLong(TEST_PROP);
-        };
-
-        ignite0 = startGrid(0);
-        ignite1 = startGrid(1);
-
-        long0 = ignite0.context().distributedConfiguration().getProperty(TEST_PROP);
-        DistributedLongProperty long1 = ignite1.context().distributedConfiguration().getProperty(TEST_PROP);
-
-        //After start it should read from local storage.
-        assertEquals(2, long0.get().longValue());
-        assertEquals(2, long1.get().longValue());
+    /** */
+    DistributedConfigurationProcessor distr(IgniteEx ignite0) {
+        return ignite0.context().distributedConfiguration();
     }
-
 }
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedConfigurationPersistentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedConfigurationPersistentTest.java
index 4db7c54..84d7e94 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedConfigurationPersistentTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/configuration/distributed/DistributedConfigurationPersistentTest.java
@@ -17,10 +17,138 @@
 
 package org.apache.ignite.internal.processors.configuration.distributed;
 
+import java.util.concurrent.atomic.AtomicReference;
+import org.apache.ignite.internal.IgniteEx;
+import org.junit.Test;
+
+import static org.apache.ignite.internal.processors.configuration.distributed.DistributedLongProperty.detachedLongProperty;
+import static org.junit.Assume.assumeTrue;
+
 /** */
 public class DistributedConfigurationPersistentTest extends DistributedConfigurationAbstractTest {
     /** {@inheritDoc} */
     @Override protected boolean isPersistent() {
         return true;
     }
+
+    /**
+     * @throws Exception If failed.
+     */
+    @Test
+    public void testSuccessClusterWideUpdate() throws Exception {
+        IgniteEx ignite0 = startGrid(0);
+        IgniteEx ignite1 = startGrid(1);
+
+        ignite0.cluster().active(true);
+
+        DistributedProperty<Long> long0 = distr(ignite0).registerProperty(detachedLongProperty(TEST_PROP));
+        DistributedProperty<Long> long1 = distr(ignite1).registerProperty(detachedLongProperty(TEST_PROP));
+
+        long0.propagate(0L);
+
+        assertEquals(0, long0.get().longValue());
+        assertEquals(0, long1.get().longValue());
+
+        assertTrue(long0.propagate(2L));
+
+        //Value changed on whole grid.
+        assertEquals(2L, long0.get().longValue());
+        assertEquals(2L, long1.get().longValue());
+
+        stopAllGrids();
+
+        ignite0 = startGrid(0);
+        ignite1 = startGrid(1);
+
+        ignite0.cluster().active(true);
+
+        long0 = distr(ignite0).registerProperty(detachedLongProperty(TEST_PROP));
+        long1 = distr(ignite1).registerProperty(detachedLongProperty(TEST_PROP));
+
+        assertEquals(2, long0.get().longValue());
+        assertEquals(2, long1.get().longValue());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    @Test
+    public void testReadLocalValueOnInactiveGrid() throws Exception {
+        assumeTrue(isPersistent());
+
+        IgniteEx ignite0 = startGrid(0);
+        startGrid(1);
+
+        ignite0.cluster().active(true);
+
+        DistributedProperty<Long> long0 = distr(ignite0).registerProperty(detachedLongProperty(TEST_PROP));
+
+        long0.propagate(0L);
+
+        assertEquals(0, long0.get().longValue());
+
+        assertTrue(long0.propagate(2L));
+
+        stopAllGrids();
+
+        ignite0 = startGrid(0);
+
+        long0 = distr(ignite0).registerProperty(detachedLongProperty(TEST_PROP));
+
+        assertEquals(2, long0.get().longValue());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    @Test
+    public void testPropagateValueOnInactiveGridShouldNotThrowException() throws Exception {
+        assumeTrue(isPersistent());
+
+        IgniteEx ignite0 = (IgniteEx)startGrids(2);
+
+        DistributedProperty<Long> long0 = distr(ignite0).registerProperty(detachedLongProperty(TEST_PROP));
+
+        long0.propagate(2L);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    @Test
+    public void testRegisterPropertyBeforeOnReadyForReadHappened() throws Exception {
+        assumeTrue(isPersistent());
+
+        IgniteEx ignite0 = startGrid(0);
+        IgniteEx ignite1 = startGrid(1);
+
+        ignite0.cluster().active(true);
+
+        DistributedProperty<Long> long0 = distr(ignite0).registerProperty(detachedLongProperty(TEST_PROP));
+
+        long0.propagate(0L);
+
+        assertEquals(0, long0.get().longValue());
+
+        long0.propagate(2L);
+
+        stopAllGrids();
+
+        AtomicReference<DistributedProperty<Long>> holder = new AtomicReference<>();
+
+        TestDistibutedConfigurationPlugin.supplier = (ctx) -> {
+            if (holder.get() == null)
+                holder.set(ctx.distributedConfiguration().registerProperty(detachedLongProperty(TEST_PROP)));
+        };
+
+        ignite0 = startGrid(0);
+        ignite1 = startGrid(1);
+
+        long0 = holder.get();
+        DistributedProperty<Long> long1 = distr(ignite1).registerProperty(detachedLongProperty(TEST_PROP));
+
+        //After start it should read from local storage.
+        assertEquals(2, long0.get().longValue());
+        assertEquals(2, long1.get().longValue());
+    }
 }
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/metastorage/DistributedMetaStoragePersistentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/metastorage/DistributedMetaStoragePersistentTest.java
index d60be0d..d150480 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/metastorage/DistributedMetaStoragePersistentTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/metastorage/DistributedMetaStoragePersistentTest.java
@@ -36,7 +36,6 @@ import org.apache.ignite.testframework.junits.WithSystemProperty;
 import org.junit.Ignore;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_GLOBAL_METASTORAGE_HISTORY_MAX_BYTES;
 import static org.apache.ignite.internal.GridComponent.DiscoveryDataExchangeType.META_STORAGE;
 import static org.hamcrest.CoreMatchers.instanceOf;
@@ -484,9 +483,10 @@ public class DistributedMetaStoragePersistentTest extends DistributedMetaStorage
      * @throws Exception If failed.
      */
     @Test @SuppressWarnings("ThrowableNotThrown")
-    @WithSystemProperty(key = IGNITE_BASELINE_AUTO_ADJUST_ENABLED, value = "false")
     public void testConflictingData() throws Exception {
-        startGrid(0);
+        IgniteEx igniteEx = startGrid(0);
+
+        igniteEx.cluster().baselineAutoAdjustEnabled(false);
 
         startGrid(1);
 
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/metastorage/DistributedMetaStorageTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/metastorage/DistributedMetaStorageTest.java
index 9517c1f..97616fb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/metastorage/DistributedMetaStorageTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/metastorage/DistributedMetaStorageTest.java
@@ -42,13 +42,18 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_GLOBAL_METASTORAGE_HISTORY_MAX_BYTES;
 
 /**
  * Test for {@link DistributedMetaStorageImpl} with disabled persistence.
  */
 public class DistributedMetaStorageTest extends GridCommonAbstractTest {
+    /**
+     * Used in tests for updatesCount counter of metastorage and corresponds to keys BASELINE_ENABLED and other initial
+     * objects that were added but should not be counted along with keys defined in tests.
+     */
+    private static final int INITIAL_UPDATES_COUNT = 2;
+
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
@@ -321,30 +326,31 @@ public class DistributedMetaStorageTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     @Test
-    @WithSystemProperty(key = IGNITE_BASELINE_AUTO_ADJUST_ENABLED, value = "false")
     public void testOptimizedWriteTwice() throws Exception {
-        startGrid(0).cluster().active(true);
+        IgniteEx igniteEx = startGrid(0);
 
-        assertEquals(0, metastorage(0).getUpdatesCount());
+        igniteEx.cluster().active(true);
 
         metastorage(0).write("key1", "value1");
 
-        assertEquals(1, metastorage(0).getUpdatesCount());
+        assertEquals(1, metastorage(0).getUpdatesCount() - INITIAL_UPDATES_COUNT);
 
         metastorage(0).write("key2", "value2");
 
-        assertEquals(2, metastorage(0).getUpdatesCount());
+        assertEquals(2, metastorage(0).getUpdatesCount() - INITIAL_UPDATES_COUNT);
 
         metastorage(0).write("key1", "value1");
 
-        assertEquals(2, metastorage(0).getUpdatesCount());
+        assertEquals(2, metastorage(0).getUpdatesCount() - INITIAL_UPDATES_COUNT);
     }
 
     /** */
+    /** */
     @Test
-    @WithSystemProperty(key = IGNITE_BASELINE_AUTO_ADJUST_ENABLED, value = "false")
     public void testClient() throws Exception {
-        startGrid(0).cluster().active(true);
+        IgniteEx igniteEx = startGrid(0);
+
+        igniteEx.cluster().active(true);
 
         metastorage(0).write("key0", "value0");
 
@@ -352,7 +358,7 @@ public class DistributedMetaStorageTest extends GridCommonAbstractTest {
 
         AtomicInteger clientLsnrUpdatesCnt = new AtomicInteger();
 
-        assertEquals(1, metastorage(1).getUpdatesCount());
+        assertEquals(1, metastorage(1).getUpdatesCount() - INITIAL_UPDATES_COUNT);
 
         assertEquals("value0", metastorage(1).read("key0"));
 
@@ -369,9 +375,10 @@ public class DistributedMetaStorageTest extends GridCommonAbstractTest {
 
     /** */
     @Test
-    @WithSystemProperty(key = IGNITE_BASELINE_AUTO_ADJUST_ENABLED, value = "false")
     public void testClientReconnect() throws Exception {
-        startGrid(0).cluster().active(true);
+        IgniteEx igniteEx = startGrid(0);
+
+        igniteEx.cluster().active(true);
 
         startClient(1);
 
@@ -392,7 +399,8 @@ public class DistributedMetaStorageTest extends GridCommonAbstractTest {
         int expUpdatesCnt = isPersistent() ? 3 : 2;
 
         // Wait enough to cover failover timeout.
-        assertTrue(GridTestUtils.waitForCondition(() -> metastorage(1).getUpdatesCount() == expUpdatesCnt, 15_000));
+        assertTrue(GridTestUtils.waitForCondition(
+            () -> metastorage(1).getUpdatesCount() - INITIAL_UPDATES_COUNT == expUpdatesCnt, 15_000));
 
         if (isPersistent())
             assertEquals("value0", metastorage(1).read("key0"));
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceReassignmentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceReassignmentTest.java
index c054ae3..7093c53 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceReassignmentTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceReassignmentTest.java
@@ -38,8 +38,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Assume;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
-
 /**
  *
  */
@@ -75,16 +73,12 @@ public class IgniteServiceReassignmentTest extends GridCommonAbstractTest {
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
         super.beforeTestsStarted();
     }
 
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
     }
 
     /** {@inheritDoc} */
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServiceDeploymentOutsideBaselineTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServiceDeploymentOutsideBaselineTest.java
index 7200dd2..cc2ca86 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServiceDeploymentOutsideBaselineTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServiceDeploymentOutsideBaselineTest.java
@@ -21,7 +21,6 @@ import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCluster;
-import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.configuration.DataRegionConfiguration;
 import org.apache.ignite.configuration.DataStorageConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -34,12 +33,9 @@ import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteFuture;
 import org.apache.ignite.services.ServiceConfiguration;
 import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.ignite.testframework.junits.WithSystemProperty;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
-
 /** */
 public class ServiceDeploymentOutsideBaselineTest extends GridCommonAbstractTest {
     /** */
@@ -73,20 +69,6 @@ public class ServiceDeploymentOutsideBaselineTest extends GridCommonAbstractTest
     }
 
     /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
-        super.beforeTestsStarted();
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        super.afterTestsStopped();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
-    }
-
-    /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
         persistence = false;
         srvcCfg = null;
@@ -111,7 +93,6 @@ public class ServiceDeploymentOutsideBaselineTest extends GridCommonAbstractTest
      * @throws Exception If failed.
      */
     @Test
-    @WithSystemProperty(key = IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED, value = "false")
     public void testDeployOutsideBaselineNoPersistence() throws Exception {
         checkDeploymentFromOutsideNode(false, false);
     }
@@ -128,7 +109,6 @@ public class ServiceDeploymentOutsideBaselineTest extends GridCommonAbstractTest
      * @throws Exception If failed.
      */
     @Test
-    @WithSystemProperty(key = IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED, value = "false")
     public void testDeployOutsideBaselineStaticNoPersistence() throws Exception {
         checkDeploymentFromOutsideNode(false, true);
     }
@@ -177,7 +157,6 @@ public class ServiceDeploymentOutsideBaselineTest extends GridCommonAbstractTest
      * @throws Exception If failed.
      */
     @Test
-    @WithSystemProperty(key = IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED, value = "false")
     public void testDeployFromEachNodes() throws Exception {
         checkDeployFromEachNodes(false, false);
     }
@@ -249,6 +228,8 @@ public class ServiceDeploymentOutsideBaselineTest extends GridCommonAbstractTest
 
         Ignite insideNode = startGrid(0);
 
+        insideNode.cluster().baselineAutoAdjustEnabled(false);
+
         if (persistence)
             insideNode.cluster().active(true);
         else {
@@ -276,6 +257,8 @@ public class ServiceDeploymentOutsideBaselineTest extends GridCommonAbstractTest
 
         Ignite insideNode = startGrid(0);
 
+        insideNode.cluster().baselineAutoAdjustEnabled(false);
+
         IgniteCluster cluster = insideNode.cluster();
 
         cluster.active(true);
@@ -312,6 +295,9 @@ public class ServiceDeploymentOutsideBaselineTest extends GridCommonAbstractTest
         persistence = true;
 
         Ignite insideNode = startGrid(0);
+
+        insideNode.cluster().baselineAutoAdjustEnabled(false);
+
         startGrid(1);
 
         IgniteCluster cluster = insideNode.cluster();
@@ -368,6 +354,8 @@ public class ServiceDeploymentOutsideBaselineTest extends GridCommonAbstractTest
             depFut.get(10, TimeUnit.SECONDS);
         }
 
+        ignite.cluster().baselineAutoAdjustEnabled(false);
+
         return ignite;
     }
 
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/IgniteDiscoveryCacheReuseSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/IgniteDiscoveryCacheReuseSelfTest.java
index 0783fde..eba2905 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/IgniteDiscoveryCacheReuseSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/IgniteDiscoveryCacheReuseSelfTest.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.spi.discovery;
 
 import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.managers.discovery.DiscoCache;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
@@ -27,7 +26,6 @@ import org.apache.ignite.internal.util.GridConcurrentHashSet;
 import org.apache.ignite.internal.util.typedef.G;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.ignite.testframework.junits.WithSystemProperty;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Test;
 
@@ -48,10 +46,10 @@ public class IgniteDiscoveryCacheReuseSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     @Test
-    @WithSystemProperty(key = IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED, value = "false")
     public void testDiscoCacheReuseOnNodeJoin() throws Exception {
-        startGridsMultiThreaded(2);
+        Ignite ignite1 = startGridsMultiThreaded(2);
 
+        ignite1.cluster().baselineAutoAdjustEnabled(false);
         // The final topology version after 2 node joins and one CacheAffinityChange message.
         AffinityTopologyVersion waited = new AffinityTopologyVersion(2, 1);
 
diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerAbstractTest.java
index fdd752d..c4a099a 100644
--- a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerAbstractTest.java
@@ -65,7 +65,6 @@ import static java.nio.file.Files.delete;
 import static java.nio.file.Files.newDirectoryStream;
 import static java.util.Arrays.asList;
 import static java.util.Objects.nonNull;
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_ENABLE_EXPERIMENTAL_COMMAND;
 import static org.apache.ignite.configuration.DataStorageConfiguration.DFLT_CHECKPOINT_FREQ;
 import static org.apache.ignite.internal.encryption.AbstractEncryptionTest.KEYSTORE_PASSWORD;
@@ -80,7 +79,6 @@ import static org.apache.ignite.util.GridCommandHandlerTestUtils.addSslParams;
  * {@link GridCommandHandlerClusterPerMethodAbstractTest}
  * {@link GridCommandHandlerClusterByClassAbstractTest}
  */
-@WithSystemProperty(key = IGNITE_BASELINE_AUTO_ADJUST_ENABLED, value = "false")
 @WithSystemProperty(key = IGNITE_ENABLE_EXPERIMENTAL_COMMAND, value = "true")
 public abstract class GridCommandHandlerAbstractTest extends GridCommonAbstractTest {
     /** */
diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerClusterByClassAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerClusterByClassAbstractTest.java
index e926efc..4f11631 100644
--- a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerClusterByClassAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerClusterByClassAbstractTest.java
@@ -46,6 +46,9 @@ public abstract class GridCommandHandlerClusterByClassAbstractTest extends GridC
         super.beforeTestsStarted();
 
         crd = startGrids(SERVER_NODE_CNT);
+
+        crd.cluster().baselineAutoAdjustEnabled(false);
+
         client = startGrid(CLIENT_NODE_NAME_PREFIX);
 
         crd.cluster().active(true);
diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
index 7277c0c..ee770e5 100644
--- a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
@@ -17,6 +17,9 @@
 
 package org.apache.ignite.util;
 
+import javax.cache.processor.EntryProcessor;
+import javax.cache.processor.EntryProcessorException;
+import javax.cache.processor.MutableEntry;
 import java.io.File;
 import java.io.IOException;
 import java.io.RandomAccessFile;
@@ -41,9 +44,6 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
-import javax.cache.processor.EntryProcessor;
-import javax.cache.processor.EntryProcessorException;
-import javax.cache.processor.MutableEntry;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteAtomicSequence;
 import org.apache.ignite.IgniteCache;
@@ -544,6 +544,8 @@ public class GridCommandHandlerTest extends GridCommandHandlerClusterPerMethodAb
     public void testBaselineAdd() throws Exception {
         Ignite ignite = startGrids(1);
 
+        ignite.cluster().baselineAutoAdjustEnabled(false);
+
         assertFalse(ignite.cluster().active());
 
         ignite.cluster().active(true);
@@ -567,6 +569,9 @@ public class GridCommandHandlerTest extends GridCommandHandlerClusterPerMethodAb
     @Test
     public void testBaselineRemove() throws Exception {
         Ignite ignite = startGrids(1);
+
+        ignite.cluster().baselineAutoAdjustEnabled(false);
+
         Ignite other = startGrid("nodeToStop");
 
         assertFalse(ignite.cluster().active());
@@ -625,6 +630,8 @@ public class GridCommandHandlerTest extends GridCommandHandlerClusterPerMethodAb
     public void testBaselineSet() throws Exception {
         Ignite ignite = startGrids(1);
 
+        ignite.cluster().baselineAutoAdjustEnabled(false);
+
         assertFalse(ignite.cluster().active());
 
         ignite.cluster().active(true);
@@ -647,6 +654,8 @@ public class GridCommandHandlerTest extends GridCommandHandlerClusterPerMethodAb
     public void testBaselineVersion() throws Exception {
         Ignite ignite = startGrids(1);
 
+        ignite.cluster().baselineAutoAdjustEnabled(false);
+
         assertFalse(ignite.cluster().active());
 
         ignite.cluster().active(true);
@@ -1451,6 +1460,8 @@ public class GridCommandHandlerTest extends GridCommandHandlerClusterPerMethodAb
     public void testCacheIdleVerifyMovingParts() throws Exception {
         IgniteEx ignite = startGrids(2);
 
+        ignite.cluster().baselineAutoAdjustEnabled(false);
+
         ignite.cluster().active(true);
 
         int parts = 32;
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/RebuildIndexLogMessageTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/RebuildIndexLogMessageTest.java
index 7980cf3..4039d8e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/RebuildIndexLogMessageTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/RebuildIndexLogMessageTest.java
@@ -36,16 +36,13 @@ import org.apache.ignite.testframework.CallbackExecutorLogListener;
 import org.apache.ignite.testframework.ListeningTestLogger;
 import org.apache.ignite.testframework.LogListener;
 import org.apache.ignite.testframework.MessageOrderLogListener;
-import org.apache.ignite.testframework.junits.WithSystemProperty;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Test;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
 
 /**
  *
  */
-@WithSystemProperty(key = IGNITE_BASELINE_AUTO_ADJUST_ENABLED, value = "false")
 public class RebuildIndexLogMessageTest extends GridCommonAbstractTest implements Serializable {
     /** */
     private static final String CACHE_NAME_A = "testCacheA";
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/baseline/IgniteChangingBaselineCacheQueryNodeRestartSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/baseline/IgniteChangingBaselineCacheQueryNodeRestartSelfTest.java
index 408c489..c6e9e82 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/baseline/IgniteChangingBaselineCacheQueryNodeRestartSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/baseline/IgniteChangingBaselineCacheQueryNodeRestartSelfTest.java
@@ -29,8 +29,6 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheQueryNodeRestartSelfTest;
 
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_BASELINE_AUTO_ADJUST_ENABLED;
-
 /**
  *
  */
@@ -53,14 +51,13 @@ public class IgniteChangingBaselineCacheQueryNodeRestartSelfTest extends IgniteC
 
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
-        System.setProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED, "false");
-
         cleanPersistenceDir();
 
         startGrids(gridCount());
 
         initStoreStrategy();
 
+        grid(0).cluster().baselineAutoAdjustEnabled(false);
         grid(0).cluster().active(true);
 
         awaitPartitionMapExchange();
@@ -71,8 +68,6 @@ public class IgniteChangingBaselineCacheQueryNodeRestartSelfTest extends IgniteC
         stopAllGrids();
 
         cleanPersistenceDir();
-
-        System.clearProperty(IGNITE_BASELINE_AUTO_ADJUST_ENABLED);
     }
 
     /** {@inheritDoc} */