ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [01/16] ignite git commit: IGNITE=5243: Fixed test failures for geo-spatial indexing.
Date Sun, 04 Jun 2017 07:50:03 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-5075-pds 9f93d85d7 -> 651546d4d


IGNITE=5243: Fixed test failures for geo-spatial indexing.


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

Branch: refs/heads/ignite-5075-pds
Commit: fbcd474303e434d8ffb46468f5a39f6c5ac0d9bb
Parents: bc30dc7
Author: devozerov <vozerov@gridgain.com>
Authored: Thu Jun 1 19:57:51 2017 +0300
Committer: devozerov <vozerov@gridgain.com>
Committed: Thu Jun 1 19:57:51 2017 +0300

----------------------------------------------------------------------
 .../query/h2/H2IndexingAbstractGeoSelfTest.java | 27 ++++++++++++++++----
 1 file changed, 22 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fbcd4743/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/H2IndexingAbstractGeoSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/H2IndexingAbstractGeoSelfTest.java
b/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/H2IndexingAbstractGeoSelfTest.java
index 7f135fd..fb6a104 100644
--- a/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/H2IndexingAbstractGeoSelfTest.java
+++ b/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/H2IndexingAbstractGeoSelfTest.java
@@ -30,6 +30,7 @@ import org.apache.ignite.cache.query.SqlFieldsQuery;
 import org.apache.ignite.cache.query.SqlQuery;
 import org.apache.ignite.cache.query.annotations.QuerySqlField;
 import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest;
 import org.apache.ignite.internal.processors.query.QueryUtils;
@@ -137,7 +138,9 @@ public abstract class H2IndexingAbstractGeoSelfTest extends GridCacheAbstractSel
 
             entity.setIndexes(null);
 
-            IgniteCache<K, V> cache = grid(0).getOrCreateCache(ccfg);
+            grid(0).context().cache().dynamicStartSqlCache(ccfg).get();
+
+            IgniteCache<K, V> cache = grid(0).cache(name);
 
             // Process indexes dynamically.
             for (QueryIndex idx : idxs) {
@@ -214,6 +217,20 @@ public abstract class H2IndexingAbstractGeoSelfTest extends GridCacheAbstractSel
     }
 
     /**
+     * Destroy cache.
+     *
+     * @param cache Cache.
+     * @param grid Node.
+     * @param dynamic Dynamic flag.
+     */
+    private static void destroy(IgniteCache cache, IgniteEx grid, boolean dynamic) {
+        if (!dynamic)
+            cache.destroy();
+        else
+            grid.context().cache().dynamicDestroyCache(cache.getName(), true, true);
+    }
+
+    /**
      * @throws Exception If failed.
      */
     public void testPrimitiveGeometry() throws Exception {
@@ -323,7 +340,7 @@ public abstract class H2IndexingAbstractGeoSelfTest extends GridCacheAbstractSel
                 cache.query(new SqlFieldsQuery("DROP INDEX \"EnemyCamp_coords_idx\"")).getAll();
         }
         finally {
-            cache.destroy();
+            destroy(cache, grid(0), dynamic);
         }
     }
 
@@ -452,7 +469,7 @@ public abstract class H2IndexingAbstractGeoSelfTest extends GridCacheAbstractSel
                 throw err0;
         }
         finally {
-            cache1.destroy();
+            destroy(cache1, grid(0), dynamic);
         }
     }
 
@@ -540,8 +557,8 @@ public abstract class H2IndexingAbstractGeoSelfTest extends GridCacheAbstractSel
             checkLocalQuery();
         }
         finally {
-            c1.destroy();
-            c2.destroy();
+            destroy(c1, grid(0), dynamic);
+            destroy(c2, grid(0), dynamic);
         }
     }
 


Mime
View raw message