ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [06/39] incubator-ignite git commit: #ignite-738: GridCacheQueryMetricsSelfTest uses new query Api.
Date Thu, 16 Apr 2015 17:36:56 GMT
#ignite-738: GridCacheQueryMetricsSelfTest uses new query Api.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/50dd6e46
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/50dd6e46
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/50dd6e46

Branch: refs/heads/ignite-485
Commit: 50dd6e4631a36dad0733aed0a05b52cc4a40fbfd
Parents: fd82d19
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Mon Apr 13 17:12:47 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Mon Apr 13 17:12:47 2015 +0300

----------------------------------------------------------------------
 .../cache/GridCacheQueryMetricsSelfTest.java       | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/50dd6e46/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMetricsSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMetricsSelfTest.java
index 3bd9777..81c2820 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMetricsSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMetricsSelfTest.java
@@ -21,15 +21,11 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.processors.cache.query.*;
 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.testframework.junits.common.*;
 
-import java.util.*;
-
 import static org.apache.ignite.cache.CacheMode.*;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
 
@@ -123,15 +119,14 @@ public class GridCacheQueryMetricsSelfTest extends GridCommonAbstractTest
{
      * @throws Exception In case of error.
      */
     public void testSingleQueryMetrics() throws Exception {
-        GridCacheAdapter<String, Integer> cache = ((IgniteKernal)grid(0)).internalCache();
+        IgniteCache<String, Integer> cache = grid(0).cache(null);
 
-        CacheQuery<Map.Entry<String, Integer>> qry = cache.queries().createSqlQuery(Integer.class,
"_val >= 0")
-            .projection(grid(0).cluster());
+        SqlQuery<String, Integer> qry = new SqlQuery(Integer.class, "_val >= 0");
 
         // Execute.
-        qry.execute().get();
+        cache.query(qry).getAll();
 
-        QueryMetrics m = qry.metrics();
+        QueryMetrics m = cache.queryMetrics();
 
         info("Metrics: " + m);
 
@@ -142,9 +137,9 @@ public class GridCacheQueryMetricsSelfTest extends GridCommonAbstractTest
{
         assertTrue(m.minimumTime() >= 0);
 
         // Execute.
-        qry.execute().get();
+        cache.query(qry).getAll();
 
-        m = qry.metrics();
+        m = cache.queryMetrics();
 
         info("Metrics: " + m);
 


Mime
View raw message