You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/06/11 20:18:05 UTC
[7/8] incubator-ignite git commit: # GG-10052: corrected logic to
check Spi sizes.
# GG-10052: corrected logic to check Spi sizes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6ad37e14
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6ad37e14
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6ad37e14
Branch: refs/heads/ignite-gg-10249
Commit: 6ad37e14f11e7ddd7d858ac0ba186bb3f7db8d02
Parents: 1048d55
Author: iveselovskiy <iv...@gridgain.com>
Authored: Thu Jun 11 21:13:21 2015 +0300
Committer: iveselovskiy <iv...@gridgain.com>
Committed: Thu Jun 11 21:13:21 2015 +0300
----------------------------------------------------------------------
.../cache/GridCacheSwapReloadSelfTest.java | 21 ++++++++++++++++----
.../cache/IgniteCachePeekModesAbstractTest.java | 4 ++--
2 files changed, 19 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6ad37e14/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapReloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapReloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapReloadSelfTest.java
index 5c0797b..501b299 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapReloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapReloadSelfTest.java
@@ -61,6 +61,15 @@ public class GridCacheSwapReloadSelfTest extends GridCommonAbstractTest {
return swap;
}
+ /**
+ * Answers if to check #count() & #size() for Spi.
+ * (Some implementations cannot count sizes.)
+ * @return If to check size.
+ */
+ protected boolean isCheckSize() {
+ return true;
+ }
+
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
@@ -147,8 +156,10 @@ public class GridCacheSwapReloadSelfTest extends GridCommonAbstractTest {
assert swapLatch.await(1, SECONDS);
Thread.sleep(100);
-// assert swap().count(spaceName()) == 1;
-// assert swap().size(spaceName()) > 0;
+ if (isCheckSize()) {
+ assert swap().count(spaceName()) == 1;
+ assert swap().size(spaceName()) > 0;
+ }
load(cache, "key", true);
@@ -202,8 +213,10 @@ public class GridCacheSwapReloadSelfTest extends GridCommonAbstractTest {
assert swapLatch.await(1, SECONDS);
Thread.sleep(100);
-// assert swap().count(spaceName()) == 2;
-// assert swap().size(spaceName()) > 0 : swap().size(spaceName());
+ if (isCheckSize()) {
+ assert swap().count(spaceName()) == 2;
+ assert swap().size(spaceName()) > 0 : swap().size(spaceName());
+ }
loadAll(cache, ImmutableSet.of("key1", "key2"), true);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6ad37e14/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
index 20023b5..515eba4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
@@ -362,7 +362,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
* (Some implementations cannot count sizes.)
* @return If to check size.
*/
- protected boolean isCheckSizes() {
+ protected boolean isCheckSize() {
return true;
}
@@ -370,7 +370,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
* @throws Exception If failed.
*/
public void testSize() throws Exception {
- if (!isCheckSizes())
+ if (!isCheckSize())
return;
checkEmpty();