demery-pivotal commented on a change in pull request #7006:
URL: https://github.com/apache/geode/pull/7006#discussion_r732240670



##########
File path: ci/pipelines/shared/jinja.variables.yml
##########
@@ -208,7 +208,7 @@ tests:
   PARALLEL_DUNIT: 'false'
   PARALLEL_GRADLE: 'false'
   PLATFORM: windows
-  RAM: '6'
+  RAM: '64'

Review comment:
       It looks as if the culprit is the properties created by 
`createServer.createServer(…)`. Those properties give the server 200mb of 
off-heap storage even if a test doesn't need it.
   
   If your test doesn't need off-heap storage, one possibility is to add a new 
version of `createServer()` that you can pass your own props to. Something like 
this:
   
   ```java
     public static int createServer(int locPort, int maximumTimeBetweenPings, 
Properties props) {
       WANTestBase test = new WANTestBase();
       props.setProperty(MCAST_PORT, "0");
       props.setProperty(LOCATORS, "localhost[" + locPort + "]");
       InternalDistributedSystem ds = test.getSystem(props);
       cache = CacheFactory.create(ds);
   
       CacheServer server = cache.addCacheServer();
       int port = getRandomAvailableTCPPort();
       server.setPort(port);
       server.setHostnameForClients("localhost");
       if (maximumTimeBetweenPings > 0) {
         server.setMaximumTimeBetweenPings(maximumTimeBetweenPings);
       }
       try {
         server.start();
       } catch (IOException e) {
         org.apache.geode.test.dunit.Assert.fail("Failed to start server ", e);
       }
       return port;
     }
   ```
   
   Then change the old method to delegate to the new one:
   ```java
     public static int createServer(int locPort, int maximumTimeBetweenPings) {
       WANTestBase test = new WANTestBase();
       Properties props = test.getDistributedSystemProperties();
       return createServer(locPort, maximumTimeBetweenPings, props);
     }
   ```
   
   Now your test (and possibly others) can call the new version with an empty 
`Properties` to get a server without creating unneeded off-heap storage.
   
   Note: I haven't tried this myself. There may be complications I'm not aware 
of.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to