mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Introduced lazy config loading. Faster in general.
Instead of allocating all memory up front for every possible command option this new approach just expects certain variable names. If those variables are used in a function the manager_property, server_property or world_property command ensures that the variable has been loaded from config files. This approach uses sed to retrieve a single line from a config file when necessary, instead of reading every line at startup.
This commit is contained in:
parent
c46db621e0
commit
60a6af24c2
6
test.sh
6
test.sh
@ -27,13 +27,11 @@ oneTimeSetUp() {
|
||||
|
||||
|
||||
setUp() {
|
||||
source "$DEFUALT_CONF"
|
||||
|
||||
# Create the testing conf from the default one
|
||||
mkdir -p "$TMP_DIR" && chown "$USERNAME" "$TMP_DIR"
|
||||
cp "$DEFUALT_CONF" "$MSM_CONF" && chown "$USERNAME" "$MSM_CONF"
|
||||
|
||||
# Overwrite the directories to use for testin purposes
|
||||
# Overwrite the directories to use for testing purposes
|
||||
echo "" >> "$MSM_CONF"
|
||||
echo "# Auto appended by test script:" >> "$MSM_CONF"
|
||||
echo "SERVER_STORAGE_PATH=\"${TMP_DIR}/servers\"" >> "$MSM_CONF"
|
||||
@ -46,8 +44,6 @@ setUp() {
|
||||
echo "DEFAULT_SCREEN_NAME=\"msmtest-{SERVER_NAME}\"" >> "$MSM_CONF"
|
||||
echo "DEFAULT_INVOCATION=\"java -Xmx${TEST_RAM}M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:+AggressiveOpts -jar {JAR} nogui\"" >> "$MSM_CONF"
|
||||
|
||||
source "$MSM_CONF"
|
||||
|
||||
# Variables accessible by all tests, which are set by the stdall, stderr,
|
||||
# stdout and quiet utility functions.
|
||||
declare OUTPUT
|
||||
|
Loading…
Reference in New Issue
Block a user