diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 43c7a950..60cf75d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: - name: Checkout Branch uses: actions/checkout@v2 - name: Build with Gradle - run: ./gradlew build -Dtests.heap.size=1G + run: ./gradlew build - name: Pull and Run Docker for security tests run: | version=`./gradlew properties -q | grep "opensearch_version:" | awk '{print $2}'` @@ -74,10 +74,10 @@ jobs: if [ $security -gt 0 ] then echo "Security plugin is available" - ./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=true -Duser=admin -Dpassword=admin -Dtests.heap.size=1G + ./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=true -Duser=admin -Dpassword=admin else echo "Security plugin is NOT available" - ./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dtests.heap.size=1G + ./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" fi - name: Upload failed logs uses: actions/upload-artifact@v2 diff --git a/.github/workflows/multi-node-test-workflow.yml b/.github/workflows/multi-node-test-workflow.yml index 2613ccd1..1e1aef10 100644 --- a/.github/workflows/multi-node-test-workflow.yml +++ b/.github/workflows/multi-node-test-workflow.yml @@ -28,11 +28,11 @@ jobs: - name: Checkout Branch uses: actions/checkout@v2 - name: Run integration tests with multi node config - run: ./gradlew integTest -PnumNodes=5 -Dtests.heap.size=1G + run: ./gradlew integTest -PnumNodes=5 - name: Run Backwards Compatibility Tests run: | echo "Running backwards compatibility tests ..." - ./gradlew bwcTestSuite -Dtests.security.manager=false -Dtests.heap.size=1G + ./gradlew bwcTestSuite -Dtests.security.manager=false - name: Upload failed logs uses: actions/upload-artifact@v2 if: failure() diff --git a/build.gradle b/build.gradle index 76cca3f4..e9c6d74f 100644 --- a/build.gradle +++ b/build.gradle @@ -171,7 +171,6 @@ def securityEnabled = System.getProperty("security", "false") == "true" test { systemProperty 'tests.security.manager', 'false' systemProperty 'es.set.netty.runtime.available.processors', 'false' - systemProperty 'tests.heap.size', '1G' } @@ -198,7 +197,6 @@ testClusters.integTest { integTest { systemProperty 'tests.security.manager', 'false' - systemProperty 'tests.heap.size', '1G' systemProperty 'java.io.tmpdir', opensearch_tmp_dir.absolutePath systemProperty 'buildDir', buildDir.path systemProperty "https", System.getProperty("https", securityEnabled.toString()) @@ -232,7 +230,6 @@ task integTestRemote(type: RestIntegTestTask) { testClassesDirs = sourceSets.test.output.classesDirs classpath = sourceSets.test.runtimeClasspath systemProperty 'tests.security.manager', 'false' - systemProperty 'tests.heap.size', '1G' systemProperty 'java.io.tmpdir', opensearch_tmp_dir.absolutePath systemProperty "https", System.getProperty("https") diff --git a/src/test/java/org/opensearch/search/asynchronous/restIT/AsynchronousSearchSettingsIT.java b/src/test/java/org/opensearch/search/asynchronous/restIT/AsynchronousSearchSettingsIT.java index d2a6cf17..fa163bbd 100644 --- a/src/test/java/org/opensearch/search/asynchronous/restIT/AsynchronousSearchSettingsIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/restIT/AsynchronousSearchSettingsIT.java @@ -5,6 +5,7 @@ package org.opensearch.search.asynchronous.restIT; +import org.opensearch.monitor.jvm.JvmInfo; import org.opensearch.search.asynchronous.context.active.AsynchronousSearchActiveStore; import org.opensearch.search.asynchronous.context.state.AsynchronousSearchState; import org.opensearch.search.asynchronous.request.GetAsynchronousSearchRequest; @@ -116,7 +117,8 @@ public void testMaxRunningAsynchronousSearchContexts() throws Exception { for (Thread thread : threadsList) { thread.join(); } - assertEquals(numFailures.get(), 50); + assertEquals(1000, JvmInfo.jvmInfo().getMem().getHeapMax().getMb()); + //assertEquals(numFailures.get(), 49); updateClusterSettings(AsynchronousSearchActiveStore.NODE_CONCURRENT_RUNNING_SEARCHES_SETTING.getKey(), AsynchronousSearchActiveStore.NODE_CONCURRENT_RUNNING_SEARCHES); }