You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by es...@apache.org on 2019/11/21 00:31:13 UTC

[geode] branch feature/GEODE-7477 created (now f7c940f)

This is an automated email from the ASF dual-hosted git repository.

eshu11 pushed a change to branch feature/GEODE-7477
in repository https://gitbox.apache.org/repos/asf/geode.git.


      at f7c940f  GEODE-7477: Allow tests to test different client/server settings.

This branch includes the following new commits:

     new f7c940f  GEODE-7477: Allow tests to test different client/server settings.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[geode] 01/01: GEODE-7477: Allow tests to test different client/server settings.

Posted by es...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

eshu11 pushed a commit to branch feature/GEODE-7477
in repository https://gitbox.apache.org/repos/asf/geode.git

View the commit online:
https://github.com/apache/geode/commit/f7c940ff917bae1c8fcb82d6624371577a33a606

commit f7c940ff917bae1c8fcb82d6624371577a33a606
Author: Eric Shu <es...@EricMacBookPro.local>
AuthorDate: Wed Nov 20 16:21:58 2019 -0800

    GEODE-7477: Allow tests to test different client/server settings.
    
     * Currently only proxy session region is being tested. We should be able to
       test caching proxy as well for Tomcat as caching proxy is the default setting.
---
 .../org/apache/geode/session/tests/TomcatContainer.java    | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/geode-assembly/geode-assembly-test/src/main/java/org/apache/geode/session/tests/TomcatContainer.java b/geode-assembly/geode-assembly-test/src/main/java/org/apache/geode/session/tests/TomcatContainer.java
index 074fc74..38d262d 100644
--- a/geode-assembly/geode-assembly-test/src/main/java/org/apache/geode/session/tests/TomcatContainer.java
+++ b/geode-assembly/geode-assembly-test/src/main/java/org/apache/geode/session/tests/TomcatContainer.java
@@ -25,6 +25,7 @@ import org.codehaus.cargo.container.configuration.StandaloneLocalConfiguration;
 import org.codehaus.cargo.container.tomcat.TomcatPropertySet;
 import org.codehaus.cargo.util.XmlReplacement;
 
+
 /**
  * Container for a tomcat installation
  *
@@ -64,8 +65,17 @@ public class TomcatContainer extends ServerContainer {
     setConfigFile(contextXMLFile.getAbsolutePath(), DEFAULT_TOMCAT_XML_REPLACEMENT_DIR,
         DEFAULT_TOMCAT_CONTEXT_XML_REPLACEMENT_NAME);
 
-    // Default properties
-    setCacheProperty("enableLocalCache", "false");
+    if (install.getConnectionType() == ContainerInstall.ConnectionType.CLIENT_SERVER) {
+      // using proxy region, override the default client/server setting to set to false
+      setCacheProperty("enableLocalCache",
+          String.valueOf(install.getConnectionType().enableLocalCache()));
+    } else {
+      // using default, either setting it explicitly or leave it off should have the same effect
+      if (System.currentTimeMillis() % 2 == 0) {
+        setCacheProperty("enableLocalCache",
+            String.valueOf(install.getConnectionType().enableLocalCache()));
+      }
+    }
     setCacheProperty("className", install.getContextSessionManagerClass());
 
     // Deploy war file to container configuration