pivotal-jbarrett commented on a change in pull request #804:
URL: https://github.com/apache/geode-native/pull/804#discussion_r631427056



##########
File path: cppcache/integration/test/CachingProxyTest.cpp
##########
@@ -51,86 +53,67 @@ class CachingProxyTest : public ::testing::Test {
 
   ~CachingProxyTest() override = default;
 
-  void SetUp() override {}
+  void SetUp() override {
+    cache.getPoolManager()
+        .createFactory()
+        .addLocator("localhost", cluster.getLocatorPort())
+        .create("pool");
+
+    region = cache.createRegionFactory(RegionShortcut::CACHING_PROXY)
+                 .setPoolName("pool")
+                 .create("region");
+  }
 
   void TearDown() override {}
 
   Cluster cluster = Cluster{LocatorCount{1}, ServerCount{1}};
+  Cache cache = CacheFactory().create();

Review comment:
       Not sure what feels dirtier. Calling a builder pattern in the 
initializer for a member variable or converting that variable to 
`std::shared_ptr` and initializing it in the `SetUp`.
   
   We should probably improve the `Cache` to default construct to an 
effectively "closed" cache so you can have it declared as a member but 
initialized to something useful later via move.




-- 
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:
[email protected]


Reply via email to