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/05/12 15:03:13 UTC
[1/2] incubator-ignite git commit: # ignite-sprint-5 added test
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-sprint-5 c23571167 -> 08360c999
# ignite-sprint-5 added 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/6395b434
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6395b434
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6395b434
Branch: refs/heads/ignite-sprint-5
Commit: 6395b434e37b93f025c7b81802a77aa4f1aebf4c
Parents: f6012f1
Author: sboikov <sb...@gridgain.com>
Authored: Tue May 12 16:02:45 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue May 12 16:02:45 2015 +0300
----------------------------------------------------------------------
.../cache/GridCacheOffheapIndexGetSelfTest.java | 111 +++++++++++++++++++
.../IgniteCacheWithIndexingTestSuite.java | 2 +
2 files changed, 113 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6395b434/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java
new file mode 100644
index 0000000..4e40040
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java
@@ -0,0 +1,111 @@
+/*
+ * 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;
+
+import org.apache.ignite.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.spi.swapspace.file.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMemoryMode.*;
+import static org.apache.ignite.cache.CacheMode.*;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
+import static org.apache.ignite.configuration.DeploymentMode.*;
+
+/**
+ * Tests off heap storage when both offheaped and swapped entries exists.
+ */
+public class GridCacheOffheapIndexGetSelfTest extends GridCommonAbstractTest {
+ /** */
+ private static final long OFFHEAP_MEM = 10L * 1024L;
+
+ /** */
+ private final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+ disco.setIpFinder(ipFinder);
+
+ cfg.setDiscoverySpi(disco);
+
+ cfg.setNetworkTimeout(2000);
+
+ cfg.setSwapSpaceSpi(new FileSwapSpaceSpi());
+
+ CacheConfiguration cacheCfg = defaultCacheConfiguration();
+
+ cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
+ cacheCfg.setSwapEnabled(true);
+ cacheCfg.setCacheMode(PARTITIONED);
+ cacheCfg.setBackups(1);
+ cacheCfg.setOffHeapMaxMemory(OFFHEAP_MEM);
+ cacheCfg.setEvictSynchronized(true);
+ cacheCfg.setEvictSynchronizedKeyBufferSize(1);
+ cacheCfg.setAtomicityMode(TRANSACTIONAL);
+ cacheCfg.setMemoryMode(OFFHEAP_TIERED);
+ cacheCfg.setEvictionPolicy(null);
+ cacheCfg.setOffHeapMaxMemory(OFFHEAP_MEM);
+ cacheCfg.setIndexedTypes(Long.class, Long.class);
+
+ cfg.setCacheConfiguration(cacheCfg);
+
+ cfg.setDeploymentMode(SHARED);
+
+ return cfg;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void beforeTestsStarted() throws Exception {
+ startGrids(2);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTestsStopped() throws Exception {
+ stopAllGrids();
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTest() throws Exception {
+ grid(0).cache(null).clear();
+ }
+
+ /**
+ * Tests behavior on offheaped entries.
+ *
+ * @throws Exception If failed.
+ */
+ public void testGet() throws Exception {
+ fail("https://issues.apache.org/jira/browse/IGNITE-873");
+
+ IgniteCache<Long, Long> cache = grid(0).cache(null);
+
+ for (long i = 0; i < 100; i++)
+ cache.put(i, i);
+
+ for (long i = 0; i < 100; i++)
+ assertEquals((Long)i, cache.get(i));
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6395b434/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java
index a2ccc82..ae45120 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java
@@ -46,6 +46,8 @@ public class IgniteCacheWithIndexingTestSuite extends TestSuite {
suite.addTestSuite(CacheTtlOnheapAtomicLocalSelfTest.class);
suite.addTestSuite(CacheTtlOnheapAtomicPartitionedSelfTest.class);
+ suite.addTestSuite(GridCacheOffheapIndexGetSelfTest.class);
+
suite.addTestSuite(CacheConfigurationP2PTest.class);
return suite;
[2/2] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-sprint-5' into ignite-sprint-5
Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-5' into ignite-sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/08360c99
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/08360c99
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/08360c99
Branch: refs/heads/ignite-sprint-5
Commit: 08360c999a73173aceef8eb7500d656ea5b386c0
Parents: 6395b43 c235711
Author: sboikov <sb...@gridgain.com>
Authored: Tue May 12 16:03:05 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue May 12 16:03:05 2015 +0300
----------------------------------------------------------------------
assembly/release-base.xml | 4 +-
bin/ignite-schema-import.bat | 2 +-
bin/ignite-schema-import.sh | 2 +-
bin/ignite.bat | 2 +-
bin/ignite.sh | 2 +-
bin/ignitevisorcmd.bat | 2 +-
bin/ignitevisorcmd.sh | 2 +-
bin/include/build-classpath.bat | 46 +++++++++++++++++++++++
bin/include/build-classpath.sh | 71 +++++++++++++++++++++++++++++++++++
bin/include/target-classpath.bat | 46 -----------------------
bin/include/target-classpath.sh | 71 -----------------------------------
pom.xml | 50 ++++++++++++------------
12 files changed, 152 insertions(+), 148 deletions(-)
----------------------------------------------------------------------