Disable update notification for tests.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/077c9cce Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/077c9cce Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/077c9cce Branch: refs/heads/ignite-406 Commit: 077c9cce064b8d52d72068095a7e8c1b728516fc Parents: 14dcb40 Author: sevdokimov <sevdoki...@gridgain.com> Authored: Wed Mar 11 17:18:03 2015 +0300 Committer: sevdokimov <sevdoki...@gridgain.com> Committed: Wed Mar 11 17:19:16 2015 +0300 ---------------------------------------------------------------------- .../ignite/internal/GridUpdateNotifierSelfTest.java | 16 ++++++++++++++++ .../testframework/junits/GridAbstractTest.java | 1 + 2 files changed, 17 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/077c9cce/modules/core/src/test/java/org/apache/ignite/internal/GridUpdateNotifierSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridUpdateNotifierSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridUpdateNotifierSelfTest.java index 78a7a9c..e9ee9a4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridUpdateNotifierSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridUpdateNotifierSelfTest.java @@ -17,7 +17,9 @@ package org.apache.ignite.internal; +import org.apache.ignite.*; import org.apache.ignite.testframework.junits.common.*; +import org.h2.constant.*; import org.jetbrains.annotations.*; import java.util.concurrent.*; @@ -32,6 +34,20 @@ public class GridUpdateNotifierSelfTest extends GridCommonAbstractTest { return 30 * 1000; } + /** {@inheritDoc} */ + @Override protected void beforeTestsStarted() throws Exception { + super.beforeTestsStarted(); + + System.setProperty(IgniteSystemProperties.IGNITE_UPDATE_NOTIFIER, "true"); + } + + /** {@inheritDoc} */ + @Override protected void afterTestsStopped() throws Exception { + super.afterTestsStopped(); + + System.setProperty(IgniteSystemProperties.IGNITE_UPDATE_NOTIFIER, "false"); + } + /** * @throws Exception If failed. */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/077c9cce/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java index bd33265..7443337 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java @@ -93,6 +93,7 @@ public abstract class GridAbstractTest extends TestCase { static { System.setProperty(IgniteSystemProperties.IGNITE_ATOMIC_CACHE_DELETE_HISTORY_SIZE, "10000"); + System.setProperty(IgniteSystemProperties.IGNITE_UPDATE_NOTIFIER, "false"); Thread timer = new Thread(new GridTestClockTimer(), "ignite-clock-for-tests");