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/04/03 12:47:11 UTC
[05/50] [abbrv] incubator-ignite git commit: ignite-gg-10009: add
tests to test suite.
ignite-gg-10009: add tests to test suite.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/fd51341c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/fd51341c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/fd51341c
Branch: refs/heads/gg-9998
Commit: fd51341c05024ef4a501c756fc2db001f4d3a9c3
Parents: b8f6904
Author: ivasilinets <iv...@gridgain.com>
Authored: Wed Apr 1 17:57:26 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Wed Apr 1 17:57:26 2015 +0300
----------------------------------------------------------------------
.../cache/ttl/CacheTtlAbstractSelfTest.java | 4 +--
...lOnheapTransactionalPartitionedSelfTest.java | 34 ++++++++++++++++++++
.../IgniteH2IndexingSpiTestSuite.java | 11 +++++++
3 files changed, 47 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd51341c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
index 25d32c0..552e2ea 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
@@ -172,11 +172,11 @@ public abstract class CacheTtlAbstractSelfTest extends GridCommonAbstractTest {
*/
private void checkSizeBeforeLive(IgniteCache<Integer, Integer> cache, int size) throws Exception {
if (memoryMode() == CacheMemoryMode.OFFHEAP_TIERED) {
- assertEquals(0, cache.localSize());
+ assertEquals(0, cache.localSize(CachePeekMode.ONHEAP));
assertEquals(size, cache.localSize(CachePeekMode.OFFHEAP));
}
else {
- assertEquals(size > MAX_CACHE_SIZE ? MAX_CACHE_SIZE : size, cache.localSize());
+ assertEquals(size > MAX_CACHE_SIZE ? MAX_CACHE_SIZE : size, cache.localSize(CachePeekMode.ONHEAP));
assertEquals(size > MAX_CACHE_SIZE ? size - MAX_CACHE_SIZE : 0, cache.localSize(CachePeekMode.OFFHEAP));
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd51341c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalPartitionedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalPartitionedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalPartitionedSelfTest.java
new file mode 100644
index 0000000..6f88844
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalPartitionedSelfTest.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ignite.internal.processors.cache.ttl;
+
+import org.apache.ignite.cache.*;
+
+/**
+ * TTL test with offheap.
+ */
+public class CacheTtlOnheapTransactionalPartitionedSelfTest extends CacheTtlOnheapTransactionalAbstractSelfTest {
+ /** {@inheritDoc} */
+ @Override protected CacheMode cacheMode() {
+ return CacheMode.PARTITIONED;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected int gridCount() {
+ return 2;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd51341c/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteH2IndexingSpiTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteH2IndexingSpiTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteH2IndexingSpiTestSuite.java
index bd9cca6..21076bd 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteH2IndexingSpiTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteH2IndexingSpiTestSuite.java
@@ -19,6 +19,7 @@ package org.apache.ignite.testsuites;
import junit.framework.*;
import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.processors.cache.ttl.*;
import org.apache.ignite.internal.processors.query.h2.*;
import org.apache.ignite.internal.processors.query.h2.opt.*;
@@ -51,6 +52,16 @@ public class IgniteH2IndexingSpiTestSuite extends TestSuite {
suite.addTestSuite(GridCacheSwapSelfTest.class);
suite.addTestSuite(GridCacheOffHeapSelfTest.class);
+ //ttl
+ suite.addTestSuite(CacheTtlOffheapAtomicLocalSelfTest.class);
+ suite.addTestSuite(CacheTtlOffheapAtomicPartitionedSelfTest.class);
+ suite.addTestSuite(CacheTtlOffheapTransactionalLocalSelfTest.class);
+ suite.addTestSuite(CacheTtlOffheapTransactionalPartitionedSelfTest.class);
+ suite.addTestSuite(CacheTtlOnheapTransactionalLocalSelfTest.class);
+ suite.addTestSuite(CacheTtlOnheapTransactionalPartitionedSelfTest.class);
+ suite.addTestSuite(CacheTtlOnheapAtomicLocalSelfTest.class);
+ suite.addTestSuite(CacheTtlOnheapAtomicPartitionedSelfTest.class);
+
return suite;
}
}