pdxcodemonkey commented on a change in pull request #658:
URL: https://github.com/apache/geode-native/pull/658#discussion_r497602977



##########
File path: cppcache/acceptance-test/SNITest.cpp
##########
@@ -174,4 +175,53 @@ TEST_F(SNITest, connectWithoutProxyFails) {
   cache.close();
 }
 
+TEST_F(SNITest, dropSNIProxyTest) {
+  const auto clientTruststore =
+      (clientSslKeysDir / boost::filesystem::path("/truststore_sni.pem"));
+
+  auto cache = CacheFactory()
+                   .set("log-level", "debug")
+                   .set("log-file", "SNITest.log")
+                   .set("ssl-enabled", "true")
+                   .set("ssl-truststore", clientTruststore.string())
+                   .create();
+
+  auto portString = runDockerCommand("docker port haproxy");
+  auto portNumber = parseProxyPort(portString);
+
+  cache.getPoolManager()
+      .createFactory()
+      .setSniProxy("localhost", portNumber)
+      .addLocator("locator-maeve", 10334)
+      .create("pool");
+
+  auto region = cache.createRegionFactory(RegionShortcut::PROXY)
+                    .setPoolName("pool")
+                    .create("jellyfish");
+
+  auto systemRVal = std::system("docker pause haproxy");
+  if (systemRVal == -1) {
+    BOOST_LOG_TRIVIAL(error) << "std::system returned: " << systemRVal;

Review comment:
       Where does this log statement go?  We're using gtest as our framework, 
does it have a logging facility that would be more appropriate?  Just curious, 
before we drop in another pseudo-dependency like this.  Is it an error here if 
the system call fails?  If so, shouldn't we just `EXPECT_NE(systemRVal, -1)` 
rather than log and move on?




----------------------------------------------------------------
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