Repository: incubator-ignite Updated Branches: refs/heads/ignite-sql-tests 47cef36d4 -> 15d761be0
ignite-sql-tests - test loop Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/197929e5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/197929e5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/197929e5 Branch: refs/heads/ignite-sql-tests Commit: 197929e52e9100f6543bd2f1ad89d045a902d23d Parents: 54d46a0 Author: S.Vladykin <[email protected]> Authored: Thu Mar 5 03:22:58 2015 +0300 Committer: S.Vladykin <[email protected]> Committed: Thu Mar 5 03:22:58 2015 +0300 ---------------------------------------------------------------------- .../cache/GridCacheCrossCacheQuerySelfTest.java | 33 +++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/197929e5/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java index 2c38f4e..da38d88 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java @@ -34,6 +34,7 @@ import org.apache.ignite.testframework.junits.common.*; import javax.cache.*; import java.util.*; +import java.util.concurrent.*; import static org.apache.ignite.cache.CacheAtomicityMode.*; import static org.apache.ignite.cache.CacheDistributionMode.*; @@ -245,8 +246,12 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest { assertEquals(8, res.get(0).get(1)); } - public void _testLoop() throws InterruptedException { - IgniteCache<Object,Object> c = ignite.jcache("partitioned"); +// @Override protected long getTestTimeout() { +// return 10 * 60 * 1000; +// } + + public void _testLoop() throws Exception { + final IgniteCache<Object,Object> c = ignite.jcache("partitioned"); X.println("___ GET READY"); @@ -254,19 +259,25 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest { X.println("___ GO"); - long start = System.currentTimeMillis(); + multithreaded(new Callable<Object>() { + @Override public Object call() throws Exception { + long start = System.currentTimeMillis(); - for (int i = 0; i < 1000000; i++) { - if (i % 1000 == 0) { - long t = System.currentTimeMillis(); + for (int i = 0; i < 1000000; i++) { + if (i % 10000 == 0) { + long t = System.currentTimeMillis(); - X.println("__ " + i + " -> " + (t - start)); + X.println(Thread.currentThread().getId() + "__ " + i + " -> " + (t - start)); - start = t; - } + start = t; + } - c.queryFields(new SqlFieldsQuery("select * from FactPurchase")).getAll(); - } + c.queryFields(new SqlFieldsQuery("select * from FactPurchase")).getAll(); + } + + return null; + } + }, 20); X.println("___ OK");
