# ignite-sprint-4 minor
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/0005e1b2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/0005e1b2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/0005e1b2 Branch: refs/heads/ignite-794 Commit: 0005e1b2ca3c03a271f759e95f113ea8b4cd96d8 Parents: 369ffd4 Author: sboikov <sboi...@gridgain.com> Authored: Fri Apr 24 12:12:10 2015 +0300 Committer: sboikov <sboi...@gridgain.com> Committed: Fri Apr 24 12:12:10 2015 +0300 ---------------------------------------------------------------------- .../cache/IgniteExcangeFutureHistoryTest.java | 77 -------------------- .../cache/IgniteExchangeFutureHistoryTest.java | 77 ++++++++++++++++++++ .../ignite/testsuites/IgniteCacheTestSuite.java | 2 +- 3 files changed, 78 insertions(+), 78 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0005e1b2/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteExcangeFutureHistoryTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteExcangeFutureHistoryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteExcangeFutureHistoryTest.java deleted file mode 100644 index 1de19de..0000000 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteExcangeFutureHistoryTest.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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.cache.*; -import org.apache.ignite.configuration.*; -import org.apache.ignite.internal.*; -import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.*; - -import java.util.*; - -/** - * Checks that top value at {@link GridCachePartitionExchangeManager#exchangeFutures()} is the newest one. - */ -public class IgniteExcangeFutureHistoryTest extends IgniteCacheAbstractTest { - /** {@inheritDoc} */ - @Override protected int gridCount() { - return 1; - } - - /** {@inheritDoc} */ - @Override protected CacheMode cacheMode() { - return CacheMode.PARTITIONED; - } - - /** {@inheritDoc} */ - @Override protected CacheAtomicityMode atomicityMode() { - return CacheAtomicityMode.ATOMIC; - } - - /** {@inheritDoc} */ - @Override protected CacheAtomicWriteOrderMode atomicWriteOrderMode() { - return CacheAtomicWriteOrderMode.PRIMARY; - } - - /** {@inheritDoc} */ - @Override protected NearCacheConfiguration nearConfiguration() { - return null; - } - - /** - * Checks reverse order of exchangeFutures. - * - * @throws Exception If failed. - */ - public void testExchangeFutures() throws Exception { - GridCachePartitionExchangeManager mgr = ((IgniteKernal)grid(0)).internalCache().context().shared().exchange(); - - for (int i = 1; i <= 10; i++) { - startGrid(i); - - List<GridDhtPartitionsExchangeFuture> futs = mgr.exchangeFutures(); - - List<GridDhtPartitionsExchangeFuture> sortedFuts = new ArrayList<>(futs); - - Collections.sort(sortedFuts, Collections.reverseOrder()); - - for (int j = 0; j < futs.size(); j++) - assertEquals(futs.get(j), sortedFuts.get(j)); - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0005e1b2/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteExchangeFutureHistoryTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteExchangeFutureHistoryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteExchangeFutureHistoryTest.java new file mode 100644 index 0000000..d607420 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteExchangeFutureHistoryTest.java @@ -0,0 +1,77 @@ +/* + * 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.cache.*; +import org.apache.ignite.configuration.*; +import org.apache.ignite.internal.*; +import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.*; + +import java.util.*; + +/** + * Checks that top value at {@link GridCachePartitionExchangeManager#exchangeFutures()} is the newest one. + */ +public class IgniteExchangeFutureHistoryTest extends IgniteCacheAbstractTest { + /** {@inheritDoc} */ + @Override protected int gridCount() { + return 1; + } + + /** {@inheritDoc} */ + @Override protected CacheMode cacheMode() { + return CacheMode.PARTITIONED; + } + + /** {@inheritDoc} */ + @Override protected CacheAtomicityMode atomicityMode() { + return CacheAtomicityMode.ATOMIC; + } + + /** {@inheritDoc} */ + @Override protected CacheAtomicWriteOrderMode atomicWriteOrderMode() { + return CacheAtomicWriteOrderMode.PRIMARY; + } + + /** {@inheritDoc} */ + @Override protected NearCacheConfiguration nearConfiguration() { + return null; + } + + /** + * Checks reverse order of exchangeFutures. + * + * @throws Exception If failed. + */ + public void testExchangeFutures() throws Exception { + GridCachePartitionExchangeManager mgr = ((IgniteKernal)grid(0)).internalCache().context().shared().exchange(); + + for (int i = 1; i <= 10; i++) { + startGrid(i); + + List<GridDhtPartitionsExchangeFuture> futs = mgr.exchangeFutures(); + + List<GridDhtPartitionsExchangeFuture> sortedFuts = new ArrayList<>(futs); + + Collections.sort(sortedFuts, Collections.reverseOrder()); + + for (int j = 0; j < futs.size(); j++) + assertEquals(futs.get(j), sortedFuts.get(j)); + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0005e1b2/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java index 9a4451c..7fbe564 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java @@ -445,7 +445,7 @@ public class IgniteCacheTestSuite extends TestSuite { suite.addTestSuite(IgniteInternalCacheTypesTest.class); - suite.addTestSuite(IgniteExcangeFutureHistoryTest.class); + suite.addTestSuite(IgniteExchangeFutureHistoryTest.class); return suite; }