geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jasonhu...@apache.org
Subject geode git commit: GEODE-105: Add test index creation after null map values are in region
Date Tue, 13 Dec 2016 23:23:18 GMT
Repository: geode
Updated Branches:
  refs/heads/develop 80525b7e8 -> 41e7352ca


GEODE-105: Add test index creation after null map values are in region


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

Branch: refs/heads/develop
Commit: 41e7352ca5bf54900f0ad1cde3540da0cb17c731
Parents: 80525b7
Author: Jason Huynh <huynhja@gmail.com>
Authored: Mon Dec 12 15:01:17 2016 -0800
Committer: Jason Huynh <huynhja@gmail.com>
Committed: Tue Dec 13 15:23:09 2016 -0800

----------------------------------------------------------------------
 .../index/MapRangeIndexMaintenanceJUnitTest.java  | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/41e7352c/geode-core/src/test/java/org/apache/geode/cache/query/internal/index/MapRangeIndexMaintenanceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/cache/query/internal/index/MapRangeIndexMaintenanceJUnitTest.java
b/geode-core/src/test/java/org/apache/geode/cache/query/internal/index/MapRangeIndexMaintenanceJUnitTest.java
index 988defb..4edba21 100644
--- a/geode-core/src/test/java/org/apache/geode/cache/query/internal/index/MapRangeIndexMaintenanceJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/query/internal/index/MapRangeIndexMaintenanceJUnitTest.java
@@ -70,6 +70,24 @@ public class MapRangeIndexMaintenanceJUnitTest {
   }
 
   @Test
+  public void testNullMapAsValueOnIndexInitDoesNotThrowException() throws Exception {
+    region =
+        CacheUtils.getCache().createRegionFactory(RegionShortcut.REPLICATE).create("portfolio");
+    qs = CacheUtils.getQueryService();
+
+    Portfolio p = new Portfolio(1, 1);
+    p.positions = null;
+    region.put(1, p);
+
+    keyIndex1 = (IndexProtocol) qs.createIndex(INDEX_NAME, "positions[*]", "/portfolio ");
+
+    SelectResults result = (SelectResults) qs
+        .newQuery("select * from /portfolio p where p.positions['SUN'] = null").execute();
+    assertEquals(0, result.size());
+  }
+
+
+  @Test
   public void testMapIndexIsUsedWithBindKeyParameter() throws Exception {
     // Create Region
     region =


Mime
View raw message