[
https://issues.apache.org/jira/browse/GEODE-7163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Juan José Ramos Cassella updated GEODE-7163:
--------------------------------------------
Description:
All classes inheriting from {{WANTestBase}} have {{off-heap}} [enabled by
default|https://github.com/apache/geode/blob/develop/geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/WANTestBase.java#L3851-L3861],
even when the actual test doesn't need it at all:
{code:java}
@Override
public Properties getDistributedSystemProperties() {
// For now all WANTestBase tests allocate off-heap memory even though
// many of them never use it.
// The problem is that WANTestBase has static methods that create instances
// of WANTestBase (instead of instances of the subclass). So we can't
override
// this method so that only the off-heap subclasses allocate off heap
memory.
Properties props = new Properties();
props.setProperty(OFF_HEAP_MEMORY_SIZE, "300m");
return props;
}
{code}
This causes unnecessary overhead in almost all wan test classes, and could even
cause an {{OutOfMemoryError}} when multiple tests are executed multiple times
without restarting the {{JVM}} on which the tests are ran.
> WANTestBase Should Not Enable OffHeap When Not Needed
> -----------------------------------------------------
>
> Key: GEODE-7163
> URL: https://issues.apache.org/jira/browse/GEODE-7163
> Project: Geode
> Issue Type: Improvement
> Reporter: Juan José Ramos Cassella
> Priority: Major
>
> All classes inheriting from {{WANTestBase}} have {{off-heap}} [enabled by
> default|https://github.com/apache/geode/blob/develop/geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/WANTestBase.java#L3851-L3861],
> even when the actual test doesn't need it at all:
> {code:java}
> @Override
> public Properties getDistributedSystemProperties() {
> // For now all WANTestBase tests allocate off-heap memory even though
> // many of them never use it.
> // The problem is that WANTestBase has static methods that create
> instances
> // of WANTestBase (instead of instances of the subclass). So we can't
> override
> // this method so that only the off-heap subclasses allocate off heap
> memory.
> Properties props = new Properties();
> props.setProperty(OFF_HEAP_MEMORY_SIZE, "300m");
> return props;
> }
> {code}
> This causes unnecessary overhead in almost all wan test classes, and could
> even cause an {{OutOfMemoryError}} when multiple tests are executed multiple
> times without restarting the {{JVM}} on which the tests are ran.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)