ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [05/37] incubator-ignite git commit: #ignite-738: GridCacheQueryMetricsSelfTest uses new query Api.
Date Thu, 16 Apr 2015 09:50:27 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/fd82d191
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/fd82d191
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/fd82d191

Branch: refs/heads/ignite-218
Commit: fd82d19158039843949bcd1f2b0a5418358983b4
Parents: dcf2835
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Mon Apr 13 17:09:22 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Mon Apr 13 17:09:22 2015 +0300

----------------------------------------------------------------------
 .../cache/GridCacheQueryMetricsSelfTest.java         | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd82d191/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 45d605c..3bd9777 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
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.processors.cache;
 
+import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.configuration.*;
@@ -82,15 +83,13 @@ public class GridCacheQueryMetricsSelfTest extends GridCommonAbstractTest
{
      * @throws Exception In case of error.
      */
     public void testAccumulativeMetrics() 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 query.
-        qry.execute().get();
+        cache.query(qry).getAll();
 
-        QueryMetrics m = cache.queries().metrics();
+        QueryMetrics m = cache.queryMetrics();
 
         assert m != null;
 
@@ -103,9 +102,9 @@ public class GridCacheQueryMetricsSelfTest extends GridCommonAbstractTest
{
         assertTrue(m.minimumTime() >= 0);
 
         // Execute again with the same parameters.
-        qry.execute().get();
+        cache.query(qry).getAll();
 
-        m = cache.queries().metrics();
+        m = cache.queryMetrics();
 
         assert m != null;
 


Mime
View raw message