[ 
https://issues.apache.org/jira/browse/GEODE-8512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17209956#comment-17209956
 ] 

ASF GitHub Bot commented on GEODE-8512:
---------------------------------------

mmartell commented on a change in pull request #661:
URL: https://github.com/apache/geode-native/pull/661#discussion_r501415996



##########
File path: cppcache/integration/test/PdxJsonTypeTest.cpp
##########
@@ -68,6 +68,32 @@ std::shared_ptr<Region> setupRegion(Cache& cache) {
   return region;
 }
 
+TEST(PdxJsonTypeTest, testGfshQueryJsonInstances) {
+  Cluster cluster{LocatorCount{1}, ServerCount{1}};
+  cluster.start();
+
+  auto& gfsh = cluster.getGfsh();
+  gfsh.create().region().withName("region").withType("REPLICATE").execute();
+
+  auto cache = cluster.createCache();
+  auto region = setupRegion(cache);
+  const std::string query_stmt{"SELECT * FROM /region"};
+
+  region->put("non-java-domain-class-entry",
+              cache.createPdxInstanceFactory(gemfireJsonClassName, false)
+                  .writeString("foo", "bar")
+                  .create());
+
+  EXPECT_NO_THROW(gfsh.query(query_stmt).execute());
+
+  region->put("java-domain-class-entry",
+              cache.createPdxInstanceFactory(gemfireJsonClassName)
+                  .writeString("foo", "bar")
+                  .create());
+
+  EXPECT_THROW(gfsh.query(query_stmt).execute(), GfshExecuteException);

Review comment:
       Please check the intended use of this EXPECT_THROW. Even with the 
GEODE-8580 fix line 94 does not throw. Maybe because the value already exists 
from the first put? If you put a different object (e.g. "foo2", "bar") on line 
91, then line 94 throws, and the test passes. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Be able to specify 'expectDomainClass' when calling createPdxInstanceFactory
> ----------------------------------------------------------------------------
>
>                 Key: GEODE-8512
>                 URL: https://issues.apache.org/jira/browse/GEODE-8512
>             Project: Geode
>          Issue Type: Improvement
>          Components: native client
>    Affects Versions: 1.13.0
>            Reporter: Mario Salazar de Torres
>            Assignee: Mario Salazar de Torres
>            Priority: Minor
>              Labels: JsonFormatter, pull-request-available
>
> Within Java client, you can specify if the PdxInstance you want to create is 
> a Java domain class or not, but this is not the case for geode-native C++ 
> client.
> Thing is that in order to implement JsonFormatter in C++ client, having this 
> change is mandatory, otherwise creating PdxType's with __GEMFIRE_JSON 
> classname will present some issues while using cquery's.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to