You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2020/09/11 16:43:04 UTC

[GitHub] [geode-native] echobravopapa commented on a change in pull request #650: GEODE-8129: Added a drop proxy test.

echobravopapa commented on a change in pull request #650:
URL: https://github.com/apache/geode-native/pull/650#discussion_r487163729



##########
File path: cppcache/acceptance-test/SNITest.cpp
##########
@@ -174,4 +174,51 @@ TEST_F(SNITest, connectWithoutProxyFails) {
   cache.close();
 }
 
+#if defined(_WIN32)
+TEST_F(SNITest, DISABLED_dropSNIProxyTest) {
+#else
+TEST_F(SNITest, dropSNIProxyTest) {
+#endif
+  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-compose pause");
+  if (systemRVal == -1) {
+    BOOST_LOG_TRIVIAL(error) << "std::system returned: " << systemRVal;
+  }
+
+  region->put("1", "one");

Review comment:
       you'll want to check/prove that the Put doesn't go through... i.e. its an expected failure and I bet there is an exception thrown...




----------------------------------------------------------------
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:
users@infra.apache.org