mmartell commented on a change in pull request #894:
URL: https://github.com/apache/geode-native/pull/894#discussion_r748755921
##########
File path: cppcache/integration/test/RegisterKeysTest.cpp
##########
@@ -575,4 +581,257 @@ TEST(RegisterKeysTest, RegisterAnyWithProxyRegion) {
cache.close();
}
+apache::geode::client::Cache createCache() {
+ return apache::geode::client::CacheFactory()
+ .set("log-level", "none")
+ .set("statistic-sampling-enabled", "false")
+ .create();
+}
+
+std::shared_ptr<apache::geode::client::Pool> createPool(
+ Cluster& cluster, apache::geode::client::Cache& cache) {
+ auto poolFactory = cache.getPoolManager().createFactory();
+ cluster.applyLocators(poolFactory);
+ poolFactory.setSubscriptionEnabled(true); // Per the customer.
+ return poolFactory.create("default");
+}
+
+std::shared_ptr<apache::geode::client::Region> setupRegion(
+ apache::geode::client::Cache& cache,
+ const std::shared_ptr<apache::geode::client::Pool>& pool) {
+ auto region =
+ cache
+ .createRegionFactory(apache::geode::client::RegionShortcut::
+ CACHING_PROXY) // Per the customer.
+ .setPoolName(pool->getName())
+ .create("region");
+
+ return region;
+}
+
+TEST(RegisterKeysTest, DontReceiveValues) {
+ Cluster cluster{LocatorCount{1}, ServerCount{1}};
+
+ cluster.start();
+
+ cluster.getGfsh()
+ .create()
+ .region()
+ .withName("region")
+ .withType("PARTITION")
+ .execute();
+
+ auto cache1 = createCache();
+ auto pool1 = createPool(cluster, cache1);
+ auto region1 = setupRegion(cache1, pool1);
+ auto attrMutator = region1->getAttributesMutator();
+
+ // put key/value pairs in the region using cache2
Review comment:
I agree comments in general are a liability, just like code. They help
while debugging the test, but I'm OK removing now.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]