Skip to content

Commit

Permalink
limit a container's runtime memory
Browse files Browse the repository at this point in the history
  • Loading branch information
dmsolr committed Oct 8, 2019
1 parent a37f21c commit 0b8e739
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions test/plugin/containers/tomcat-container/docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ curl -s http://localhost:12800/receiveData > ${SCENARIO_HOME}/data/actualData.ya
echo "To validate"
java -jar \
-Dv2=true \
-Xmx256m -Xms256m \
-DtestDate="`date +%Y-%m-%d-%H-%M`" \
-DtestCasePath=${SCENARIO_HOME}/data/ \
${TOOLS_HOME}/skywalking-validator-tools.jar 1>/dev/null 2>&2
Expand Down
1 change: 1 addition & 0 deletions test/plugin/mock-collector/bin/collector-startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ do
CLASSPATH="$i:$CLASSPATH"
done

JAVA_OPTS="${JAVA_OPTS} -Xmx256m -Xms256m"
JAVA_OPTS="${JAVA_OPTS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 "

$_RUNJAVA ${JAVA_OPTS} -classpath $CLASSPATH org.apache.skywalking.plugin.test.mockcollector.Main
6 changes: 4 additions & 2 deletions test/plugin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,16 @@ do

mv ./target/${scenario_name}.war ${case_work_base}

java -Dconfigure.file=${scenario_home}/configuration.yml \
java -jar \
-Xmx256m -Xms256m \
-Dconfigure.file=${scenario_home}/configuration.yml \
-Dscenario.home=${case_work_base} \
-Dscenario.name=${scenario_name} \
-Dscenario.version=${version} \
-Doutput.dir=${case_work_base} \
-Dagent.dir=${agent_home} \
-Ddocker.image.version=${build_id} \
-jar ${plugin_autotest_helper} 1>${case_work_logs_dir}/helper.log 2>&2
${plugin_autotest_helper} 1>${case_work_logs_dir}/helper.log 2>&2

[[ $? -ne 0 ]] && exitWithMessage "${testcase_name}, generate script failure!"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
-->

docker run \
--memory=1024m \
--name ${docker_container_name} \
--env SCENARIO_NAME=${scenario_name} \
--env SCENARIO_VERSION=${scenario_version} \
Expand Down

0 comments on commit 0b8e739

Please sign in to comment.