Преглед на файлове

Merge pull request #20080 from jasontedor/min-heap-equals-max-heap

Set default min heap equal to default max heap
Jason Tedor преди 9 години
родител
ревизия
503059d9a5
променени са 2 файла, в които са добавени 7 реда и са изтрити 3 реда
  1. 3 1
      buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy
  2. 4 2
      distribution/build.gradle

+ 3 - 1
buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy

@@ -54,7 +54,9 @@ class ClusterConfiguration {
     boolean debug = false
 
     @Input
-    String jvmArgs = System.getProperty('tests.jvm.argline', '')
+    String jvmArgs = "-Xms" + System.getProperty('tests.heap.size', '512m') +
+            " " + "-Xmx" + System.getProperty('tests.heap.size', '512m') +
+            " " + System.getProperty('tests.jvm.argline', '')
 
     /**
      * The seed nodes port file. In the case the cluster has more than one node we use a seed node

+ 4 - 2
distribution/build.gradle

@@ -479,6 +479,8 @@ task run(type: RunTask) {
  * </dl>
  */
 Map<String, String> expansionsForDistribution(distributionType) {
+  final String defaultHeapSize = "2g"
+
   String footer = "# Built for ${project.name}-${project.version} " +
       "(${distributionType})"
   Map<String, Object> expansions = [
@@ -498,8 +500,8 @@ Map<String, String> expansionsForDistribution(distributionType) {
       'def': '',
     ],
 
-    'heap.min': "256m",
-    'heap.max': "2g",
+    'heap.min': defaultHeapSize,
+    'heap.max': defaultHeapSize,
 
     'stopping.timeout': [
       'rpm': 86400,