You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by nt...@apache.org on 2015/07/14 09:31:57 UTC
incubator-ignite git commit: IGNITE-1108 Fixed tests.
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-1108 affce40be -> e7d9900a0
IGNITE-1108 Fixed 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/e7d9900a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e7d9900a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e7d9900a
Branch: refs/heads/ignite-1108
Commit: e7d9900a097767ec5c24ffcc0e4439b0338f56db
Parents: affce40
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Tue Jul 14 10:31:53 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Tue Jul 14 10:31:53 2015 +0300
----------------------------------------------------------------------
.../internal/IgnitePluginLifecycleSelfTest.java | 33 ++++++++++++++------
1 file changed, 23 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7d9900a/modules/core/src/test/java/org/apache/ignite/internal/IgnitePluginLifecycleSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgnitePluginLifecycleSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgnitePluginLifecycleSelfTest.java
index 43c1c05..9085630 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/IgnitePluginLifecycleSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/IgnitePluginLifecycleSelfTest.java
@@ -30,6 +30,9 @@ import java.util.concurrent.*;
@GridCommonTest(group = "Kernal Self")
public class IgnitePluginLifecycleSelfTest extends GridCommonAbstractTest {
/** */
+ public static boolean enableAssert = false;
+
+ /** */
public IgnitePluginLifecycleSelfTest() {
super(false);
}
@@ -44,9 +47,13 @@ public class IgnitePluginLifecycleSelfTest extends GridCommonAbstractTest {
*/
public void testStopGrid() throws Exception {
try {
+ enableAssert = true;
+
startGrid("testGrid");
}
finally {
+ enableAssert = false;
+
stopGrid("testGrid", true);
}
@@ -81,7 +88,8 @@ public class IgnitePluginLifecycleSelfTest extends GridCommonAbstractTest {
@Override public void onBeforeStart() throws IgniteCheckedException {
bfStart = true;
- assertFalse(start || afStart || bfStop || stop || afStop);
+ if (enableAssert)
+ assertFalse(start || afStart || bfStop || stop || afStop);
}
/** {@inheritDoc} */
@@ -90,33 +98,38 @@ public class IgnitePluginLifecycleSelfTest extends GridCommonAbstractTest {
start = true;
- assertFalse(afStart || bfStop || stop || afStop);
+ if (enableAssert)
+ assertFalse(afStart || bfStop || stop || afStop);
}
@Override public void onAfterStart() throws IgniteCheckedException {
afStart = true;
- assertFalse(bfStop || stop || afStop);
+ if (enableAssert)
+ assertFalse(bfStop || stop || afStop);
}
@Override public void onBeforeStop(boolean cancel) {
bfStop = true;
- assertFalse(stop || afStop);
+ if (enableAssert)
+ assertFalse(stop || afStop);
}
@Override public void stop(boolean cancel) throws IgniteCheckedException {
stop = true;
- assertFalse(afStop);
+ if (enableAssert)
+ assertFalse(afStop);
}
@Override public void onAfterStop(boolean cancel) {
- GridTestUtils.assertThrows(null, new Callable<Object>() {
- @Override public Object call() throws Exception {
- return ignite.cache(null);
- }
- }, IllegalStateException.class, null);
+ if (enableAssert)
+ GridTestUtils.assertThrows(null, new Callable<Object>() {
+ @Override public Object call() throws Exception {
+ return ignite.cache(null);
+ }
+ }, IllegalStateException.class, null);
afStop = true;
}