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/08/26 14:16:06 UTC

[GitHub] [geode-native] mmartell opened a new pull request #641: GEODE-8398: Add sni unittest for dotnet

mmartell opened a new pull request #641:
URL: https://github.com/apache/geode-native/pull/641


   Since the .NET API is a thin wrapper around the C++ API, all we really need to test in this layer is that the sni parameters are passed properly to the C++ layer.
   
   This PR adds a new unit test in the new google test framework. Also includes new accessor functions to the pool API to get and set the sni parameters.  


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



[GitHub] [geode-native] mmartell commented on a change in pull request #641: GEODE-8398: Add sni unittest for dotnet

Posted by GitBox <gi...@apache.org>.
mmartell commented on a change in pull request #641:
URL: https://github.com/apache/geode-native/pull/641#discussion_r477356345



##########
File path: clicache/test2/Tests2.cs
##########
@@ -123,7 +123,24 @@ public void RegisterPdxType()
       Assert.False(_pdxDelegate2Called);
     }
 
-    private class DummyPdxSerializer : IPdxSerializer
+    [Fact]
+    public void SetSniProxy()
+    {
+        PoolFactory poolFactory = _cacheOne.GetPoolFactory()
+                .AddLocator("localhost", 10334);
+
+        poolFactory.SetSniProxy("haproxy", 7777);

Review comment:
       Good catch.




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



[GitHub] [geode-native] mmartell commented on a change in pull request #641: GEODE-8398: Add sni unittest for dotnet

Posted by GitBox <gi...@apache.org>.
mmartell commented on a change in pull request #641:
URL: https://github.com/apache/geode-native/pull/641#discussion_r477357183



##########
File path: cppcache/src/Pool.cpp
##########
@@ -45,6 +45,9 @@ std::chrono::milliseconds Pool::getReadTimeout() const {
   return m_attrs->getReadTimeout();
 }
 
+std::string Pool::getSniProxyHost() const { return m_attrs->getSniProxyHost(); }

Review comment:
       Formatting is consistent with our 80 column limit and other single line functions in this file.




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



[GitHub] [geode-native] mmartell merged pull request #641: GEODE-8398: Add sni unittest for dotnet

Posted by GitBox <gi...@apache.org>.
mmartell merged pull request #641:
URL: https://github.com/apache/geode-native/pull/641


   


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



[GitHub] [geode-native] echobravopapa commented on a change in pull request #641: GEODE-8398: Add sni unittest for dotnet

Posted by GitBox <gi...@apache.org>.
echobravopapa commented on a change in pull request #641:
URL: https://github.com/apache/geode-native/pull/641#discussion_r477413163



##########
File path: cppcache/src/Pool.cpp
##########
@@ -45,6 +45,9 @@ std::chrono::milliseconds Pool::getReadTimeout() const {
   return m_attrs->getReadTimeout();
 }
 
+std::string Pool::getSniProxyHost() const { return m_attrs->getSniProxyHost(); }

Review comment:
       okay, github just wrapped it, which made it look bad




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



[GitHub] [geode-native] echobravopapa commented on a change in pull request #641: GEODE-8398: Add sni unittest for dotnet

Posted by GitBox <gi...@apache.org>.
echobravopapa commented on a change in pull request #641:
URL: https://github.com/apache/geode-native/pull/641#discussion_r477343512



##########
File path: clicache/test2/Tests2.cs
##########
@@ -123,7 +123,24 @@ public void RegisterPdxType()
       Assert.False(_pdxDelegate2Called);
     }
 
-    private class DummyPdxSerializer : IPdxSerializer
+    [Fact]
+    public void SetSniProxy()
+    {
+        PoolFactory poolFactory = _cacheOne.GetPoolFactory()
+                .AddLocator("localhost", 10334);
+
+        poolFactory.SetSniProxy("haproxy", 7777);

Review comment:
       I'd like to see this right after `AddLocator` in the typical builder pattern look...

##########
File path: cppcache/src/Pool.cpp
##########
@@ -45,6 +45,9 @@ std::chrono::milliseconds Pool::getReadTimeout() const {
   return m_attrs->getReadTimeout();
 }
 
+std::string Pool::getSniProxyHost() const { return m_attrs->getSniProxyHost(); }

Review comment:
       formatting looks off here... 




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