You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by iv...@apache.org on 2015/07/20 17:05:38 UTC
[22/23] incubator-ignite git commit: #ignite-1087: fix test
#ignite-1087: fix test
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7e95c5fc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7e95c5fc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7e95c5fc
Branch: refs/heads/ignite-1087
Commit: 7e95c5fc72885f8c7b47ab99bce709ed3d77f459
Parents: 046a6f8
Author: ivasilinets <iv...@gridgain.com>
Authored: Mon Jul 13 18:52:02 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Mon Jul 13 18:52:02 2015 +0300
----------------------------------------------------------------------
.../cache/CacheAffinityCallSelfTest.java | 27 ++++++++++++++------
1 file changed, 19 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e95c5fc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java
index b89e078..c4436ca 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java
@@ -18,6 +18,7 @@
package org.apache.ignite.internal.processors.cache;
import org.apache.ignite.*;
+import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.*;
@@ -79,6 +80,11 @@ public class CacheAffinityCallSelfTest extends GridCommonAbstractTest {
return cfg;
}
+ /** {@inheritDoc} */
+ @Override protected void afterTest() throws Exception {
+ stopAllGrids();
+ }
+
/**
* @throws Exception If failed.
*/
@@ -121,14 +127,19 @@ public class CacheAffinityCallSelfTest extends GridCommonAbstractTest {
}
});
- GridTestUtils.assertThrows(log, new Callable<Object>() {
- @Override public Object call() throws Exception {
- while (!fut.isDone())
- client.compute().affinityCall(CACHE_NAME, key, new CheckCallable(key));
-
- return null;
- }
- }, ComputeTaskCancelledException.class, null);
+ try {
+ while (!fut.isDone())
+ client.compute().affinityCall(CACHE_NAME, key, new CheckCallable(key));
+ }
+ catch (ComputeTaskCancelledException e) {
+ assertTrue(e.getMessage().contains("stopping"));
+ }
+ catch(ClusterGroupEmptyException e) {
+ assertTrue(e.getMessage().contains("Topology projection is empty"));
+ }
+ catch(IgniteException e) {
+ assertTrue(e.getMessage().contains("cache (or node) is stopping"));
+ }
stopGrid(SERVERS_COUNT);
}