Skip to content

Commit

Permalink
GEODE-7477: Allow tests to test different client/server settings. (ap…
Browse files Browse the repository at this point in the history
…ache#4352)

* 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.
  • Loading branch information
pivotal-eshu authored Nov 21, 2019
1 parent 59dc4b4 commit 2e04da3
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.codehaus.cargo.container.tomcat.TomcatPropertySet;
import org.codehaus.cargo.util.XmlReplacement;


/**
* Container for a tomcat installation
*
Expand Down Expand Up @@ -64,8 +65,17 @@ public TomcatContainer(TomcatInstall install, File containerConfigHome,
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
Expand Down

0 comments on commit 2e04da3

Please sign in to comment.