Skip to content

Add Cassandra support #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions conf/samples/cassandra-3.11.4.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#Required (user-specific):
system_dir_path=/home/robertking/cc/OrderLab/T2C/OK-systems/cassandra
ticket_collection_path=${ok_dir}/conf/samples/cs-collections

#Required (customized rule-related):
time_window_length_in_millis=5000
#(deprecated) enable_full_instrument_mode=true
#select instrumentation range: strict-selective, relaxed-selective, specified_selective, full
gentrace_instrument_mode=relaxed-selective
verify_survivor_mode=false

#Required (system related):
java_class_path="${system_dir_path}/build/classes/main/:${system_dir_path}/build/classes/thrift/:${system_dir_path}/lib/*:${system_dir_path}/build/lib/jars/*"
test_classes_dir_path="${system_dir_path}/build/test/classes/"
system_package_prefix=org.apache.cassandra
test_class_name_regex=.*Test$
compile_test_cmd="ant clean build-test"
jvm_args_for_tests="-Dcassandra.config=file://${system_dir_path}/test/conf/cassandra.yaml \
-Dlegacy-sstable-root=${system_dir_path}/test/data/legacy-sstables \
-Dinvalid-legacy-sstable-root=${system_dir_path}/test/data/invalid-legacy-sstables \
-Dcorrupt-sstable-root=${system_dir_path}/test/data/corrupt-sstables \
-Dmigration-sstable-root=${system_dir_path}/test/data/migration-sstables \
-Dcassandra.config.loader=org.apache.cassandra.OffsetAwareConfigurationLoader \
-Dcassandra.ring_delay_ms=1000 \
-Dcassandra.tolerate_sstable_size=true \
-Dstorage-config=file://${system_dir_path}/test/conf/cassandra.yaml \
-Dcassandra.skip_sync=true \
-Dcassandra.memtable_row_overhead_computation_step=100 \
-Dcassandra.test.use_prepared=true \
-Dcassandra.test.offsetseed=0 \
-Dcassandra.test.sstableformatdevelopment=true \
-Djava.security.egd=file:/dev/urandom \
-Dcassandra.testtag= \
-Dcassandra.strict.runtime.checks=true"

#Optional (testing-use):
verify_abort_after_three_test=false
force_instrument_nothing=false
force_track_no_states=true
force_disable_prod_checking=false
force_disable_enqueue_events=false
dump_suppress_inv_list_when_checking=false

#Optional:
instrument_state_fields=
instrument_class_allmethods=
exclude_class_list=pl4c3h0ld3r_57r1n6

##in case you only want to run certain test classes, leave empty means run all
#specified_test_class_list=org.apache.zookeeper.test.ClientTest
##mark some test methods to be incapable to generate templates, these will still run but will not dump templates and will not counted in ratio
#excluded_test_method_list=
6 changes: 6 additions & 0 deletions conf/samples/cs-collections/CASSANDRA-10606.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# https://issues.apache.org/jira/browse/CASSANDRA-10606
# https://github.com/apache/cassandra/commit/3615da58310a778c7ee6d9b2d77fd3fb7a6700f4
commit_id=3615da58310a778c7ee6d9b2d77fd3fb7a6700f4
test_name=org.apache.cassandra.db.partition.PartitionUpdateTest
test_trace_prefix=org.apache.cassandra.db.partition.PartitionUpdateTest
compile_test_cmd="cp ${ok_dir}/conf/samples/cs-patches/build.properties.default . && git apply ${ok_dir}/conf/samples/cs-patches/repo.patch && ant clean build-test"
8 changes: 8 additions & 0 deletions conf/samples/cs-collections/CASSANDRA-11803.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# https://issues.apache.org/jira/browse/CASSANDRA-11803
# https://github.com/apache/cassandra/commit/bc9a0793944f7dd481646c4014d13b844439906c
commit_id=bc9a0793944f7dd481646c4014d13b844439906c
test_name=org.apache.cassandra.cql3.ReservedKeywordsTest
test_trace_prefix=org.apache.cassandra.cql3.ReservedKeywordsTest
compile_test_cmd="cp ${ok_dir}/conf/samples/cs-patches/build.properties.default . && git apply ${ok_dir}/conf/samples/cs-patches/repo.patch && ant clean build-test"

# tag: no suitable template, and hard to make one
8 changes: 8 additions & 0 deletions conf/samples/cs-collections/CASSANDRA-13174.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# https://issues.apache.org/jira/browse/CASSANDRA-13174
# https://github.com/apache/cassandra/commit/6487876dde14c46d5753f972909e5acec854cb53
commit_id=6487876dde14c46d5753f972909e5acec854cb53
test_name=org.apache.cassandra.cql3.validation.operations.SelectTest
test_trace_prefix=org.apache.cassandra.cql3.validation.operations.SelectTest@testFilteringOnDurationColumn
compile_test_cmd="cp ${ok_dir}/conf/samples/cs-patches/build.properties.default . && git apply ${ok_dir}/conf/samples/cs-patches/repo.patch && ant clean build-test"

# tag: non-semantic (failure signal)
8 changes: 8 additions & 0 deletions conf/samples/cs-collections/CASSANDRA-13246.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# https://issues.apache.org/jira/browse/CASSANDRA-13246
# https://github.com/apache/cassandra/commit/0eebc6e6b7cd7fc801579e57701608e7bf155ee0
commit_id=0eebc6e6b7cd7fc801579e57701608e7bf155ee0
test_name=org.apache.cassandra.cql3.validation.entities.SecondaryIndexTest
test_trace_prefix=org.apache.cassandra.cql3.validation.entities.SecondaryIndexTest@testSelectOnMultiIndexOnCollectionsWithNull
compile_test_cmd="cp ${ok_dir}/conf/samples/cs-patches/build.properties.default . && git apply ${ok_dir}/conf/samples/cs-patches/repo.patch && ant clean build-test"

# tag: non-semantic, failure signal
10 changes: 10 additions & 0 deletions conf/samples/cs-collections/CASSANDRA-13691.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# https://issues.apache.org/jira/browse/CASSANDRA-13691
# https://github.com/apache/cassandra/commit/ba71289778369e71d9abbdb93cb6b91ba67f9c85
commit_id=ba71289778369e71d9abbdb93cb6b91ba67f9c85
test_name=org.apache.cassandra.db.context.CounterContextTest
test_trace_prefix=org.apache.cassandra.db.context.CounterContextTest@testCounterUpdate
compile_test_cmd="cp ${ok_dir}/conf/samples/cs-patches/build.properties.default . && git apply ${ok_dir}/conf/samples/cs-patches/repo.patch && ant clean build-test"

# RK: probably won't use
# tag: upgrade
# dtest in 55c4ca8bd450b81da6eed5055981b629b55dea15
6 changes: 6 additions & 0 deletions conf/samples/cs-collections/CASSANDRA-13730.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# https://issues.apache.org/jira/browse/CASSANDRA-13730
# https://github.com/apache/cassandra/commit/d9eabd3d0cbf1287aa7d01bc23dd8e39c3acf232
commit_id=d9eabd3d0cbf1287aa7d01bc23dd8e39c3acf232
test_name=org.apache.cassandra.cql3.validation.operations.DropTest
test_trace_prefix=org.apache.cassandra.cql3.validation.operations.DropTest@testDropTableWithDroppedColumns
compile_test_cmd="cp ${ok_dir}/conf/samples/cs-patches/build.properties.default . && git apply $[ok_dir]/conf/samples/cs-patches/repo.patch && ant clean build-test"
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This is a feature ticket, and not a regression test, but still put here for
# future reference.
# https://issues.apache.org/jira/browse/CASSANDRA-14937
#case specific
commit_id=c100f1ac40137a0d6d0793930cdfce3845880a12
test_name=org.apache.cassandra.distributed.upgrade.UpgradeTest
test_trace_prefix=org.apache.cassandra.distributed.upgrade.UpgradeTest
compile_test_cmd="cp ${ok_dir}/conf/samples/cs-patches/build.properties.default . && git apply ${ok_dir}/conf/samples/cs-patches/repo.patch && ant clean build-test"
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://issues.apache.org/jira/browse/CASSANDRA-15072
# pregen_cmd="git reset --hard && git checkout 63ff65a8dd3a31e500ae5ec6232f1f9eade6fa3d && ant dtest-jar && ant clean"

commit_id=d27c3ad0d2d006a5f156f0a2f2a24286d31c5069
test_name=org.apache.cassandra.distributed.upgrade.CompactStorage2to3UpgradeTest
test_trace_prefix=org.apache.cassandra.distributed.upgrade.CompactStorage2to3UpgradeTest
compile_test_cmd="cp ${ok_dir}/conf/samples/cs-patches/build.properties.default . && git apply ${ok_dir}/conf/samples/cs-patches/{repo.patch,NPE.patch} && ant clean dtest-jar"
8 changes: 8 additions & 0 deletions conf/samples/cs-collections/CASSANDRA-8558.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# https://issues.apache.org/jira/browse/CASSANDRA-8558
# https://github.com/apache/cassandra/commit/1c9c47d26f2da98d1a923254858bcde550122445
commit_id=1c9c47d26f2da98d1a923254858bcde550122445
test_name=org.apache.cassandra.cql3.RangeDeletionTest
test_trace_prefix=org.apache.cassandra.cql3.RangeDeletionTest
compile_test_cmd="cp ${ok_dir}/conf/samples/cs-patches/build.properties.default . && git apply ${ok_dir}/conf/samples/cs-patches/repo.patch && ant clean build-test"

# tag: Cassandra v2
8 changes: 8 additions & 0 deletions conf/samples/cs-collections/CASSANDRA-9540.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# https://issues.apache.org/jira/browse/CASSANDRA-9540
# https://github.com/apache/cassandra/commit/d6c37bdd18b2632ea9093f2422a0cfa723e36b96
commit_id=d6c37bdd18b2632ea9093f2422a0cfa723e36b96
test_name=org.apache.cassandra.cql3.LargeCompactValueTest
test_trace_prefix=org.apache.cassandra.cql3.LargeCompactValueTest
compile_test_cmd="cp ${ok_dir}/conf/samples/cs-patches/build.properties.default . && git apply ${ok_dir}/conf/samples/cs-patches/repo.patch && ant clean build-test"

# tag: semantic, v2
35 changes: 35 additions & 0 deletions conf/samples/cs-collections/gentmpl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

if [[ $# < 3 ]]; then
echo Expected 3 arguments and 1 optional, found $#
echo 'Usage example: gentmpl.sh 11803 bc9a0793944f7dd481646c4014d13b844439906c org.apache.cassandra.cql3.ReservedKeywordsTest [methodName]'
exit 1
fi

ticket_id=$1
commit_id=$2
test_name=$3

if ![[ "$ticket_id" =~ ^CASSANDRA.*$ ]]; then
ticket_id=CASSANDRA-${ticket_id}
fi

if [[ "$test_name" =~ .java$ ]]; then
test_name=$(echo $test_name | perl -pe 's/.*(org.*).java/\1/ and s/\//./g')
fi

prefix=$test_name
if [[ $# > 3 ]]; then
prefix="${prefix}@$4"
fi

cat > ${ticket_id}.properties <<EOF
# https://issues.apache.org/jira/browse/${ticket_id}
# https://github.com/apache/cassandra/commit/${commit_id}
commit_id=${commit_id}
test_name=${test_name}
test_trace_prefix=$prefix
compile_test_cmd="cp \${ok_dir}/conf/samples/cs-patches/build.properties.default . && git apply \${ok_dir}/conf/samples/cs-patches/repo.patch && ant clean build-test"
EOF

vi ${ticket_id}.properties
19 changes: 19 additions & 0 deletions conf/samples/cs-patches/NPE.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
commit 527514109469b925ee310abf06848c8eb484da13
Author: Blake Eggleston <[email protected]>
Date: Thu Apr 25 15:18:07 2019 -0700

ninja: fix CASSANDRA-15078 NPE

diff --git a/test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java b/test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java
index 1dc7a657fa..c27d9bf2d8 100644
--- a/test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java
+++ b/test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java
@@ -141,7 +141,7 @@ public abstract class AbstractCluster<I extends IInstance> implements ICluster,
{
if (!isShutdown)
throw new IllegalStateException();
- delegate.startup(AbstractCluster.this);
+ delegate().startup(AbstractCluster.this);
isShutdown = false;
updateMessagingVersions();
}
3 changes: 3 additions & 0 deletions conf/samples/cs-patches/build.properties.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Maven2 Repository Locations (you can override these in "build.properties" to point to a local proxy, e.g. Nexus)
artifact.remoteRepository.central: https://repo1.maven.org/maven2
artifact.remoteRepository.apache: https://repository.apache.org/content/repositories/releases
13 changes: 13 additions & 0 deletions conf/samples/cs-patches/repo.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/build.xml b/build.xml
index 94b07f3396..c08105d9d2 100644
--- a/build.xml
+++ b/build.xml
@@ -86,7 +86,7 @@
<property name="maven-ant-tasks.version" value="2.1.3" />
<property name="maven-ant-tasks.local" value="${user.home}/.m2/repository/org/apache/maven/maven-ant-tasks"/>
<property name="maven-ant-tasks.url"
- value="http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks" />
+ value="https://repo1.maven.org/maven2/org/apache/maven/maven-ant-tasks" />
<!-- details of how and which Maven repository we publish to -->
<property name="maven.version" value="3.0.3" />
<condition property="maven-repository-url" value="https://repository.apache.org/service/local/staging/deploy/maven2">
1 change: 1 addition & 0 deletions conf/samples/hbase-1.3.1.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ test_classes_dir_path="${system_dir_path}/hbase-server/target/test-classes/"
system_package_prefix=org.apache.hadoop.hbase
test_class_name_regex=Test.*
compile_test_cmd="mvn clean package -DskipTests"
jvm_args_for_tests=

#Optional (testing-use):
verify_abort_after_three_test=false
Expand Down
1 change: 1 addition & 0 deletions conf/samples/hbase-2.4.properties
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ test_classes_dir_path="${system_dir_path}/hbase-server/target/test-classes/"
system_package_prefix=org.apache.hadoop.hbase.
test_class_name_regex=Test.*
compile_test_cmd="mvn clean package -DskipTests"
jvm_args_for_tests=

#Optional (testing-use):
verify_abort_after_three_test=false
Expand Down
1 change: 1 addition & 0 deletions conf/samples/hdfs-3.2.1.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ hadoop-common-project/hadoop-nfs,hadoop-common-project/hadoop-kms,\
hadoop-hdfs-project/hadoop-hdfs,\
hadoop-hdfs-project/hadoop-hdfs-client,hadoop-hdfs-project/hadoop-hdfs-httpfs,hadoop-hdfs-project/hadoop-hdfs-native-client,\
hadoop-hdfs-project/hadoop-hdfs-nfs,hadoop-hdfs-project/hadoop-hdfs-rbf -am"
jvm_args_for_tests=

#Optional (testing-use):
verify_abort_after_three_test=false
Expand Down
1 change: 1 addition & 0 deletions conf/samples/kafka-0.10.0.0.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ test_classes_dir_path="${system_dir_path}/core/build/classes/scala/test/"
system_package_prefix=kafka.
test_class_name_regex=.*Test$
compile_test_cmd="./gradlew jar"
jvm_args_for_tests=

#Optional (testing-use):
verify_abort_after_three_test=false
Expand Down
1 change: 1 addition & 0 deletions conf/samples/kafka-2.6.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ test_classes_dir_path="${system_dir_path}/core/build/classes/scala/test/"
system_package_prefix=kafka.
test_class_name_regex=.*Test$
compile_test_cmd="gradle && ./gradlew jar"
jvm_args_for_tests=

#Optional (testing-use):
verify_abort_after_three_test=false
Expand Down
1 change: 1 addition & 0 deletions conf/samples/zk-3.6.1.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ test_classes_dir_path="${system_dir_path}/build/test/classes/"
system_package_prefix=org.apache.zookeeper
test_class_name_regex=.*Test$
compile_test_cmd="ant clean compile-test"
jvm_args_for_tests=

#Optional (testing-use):
verify_abort_after_three_test=false
Expand Down
30 changes: 10 additions & 20 deletions run_engine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,16 @@ gentrace_test () {
cd ${system_dir_path} || return
echo "full_class_path: ${full_class_path}"
echo "gentrace_test:"
echo "java -cp ${full_class_path} \
-Xmx8g \
-Dok.testname=${test_name} -Dok.invmode=dump -Dok.patchstate=${patchstate} \
-Dok.conf=${conf_file_realpath} -Dok.filediff="${diff_file_list}" -Dlog4j.configuration=${log4j_conf} \
-Dok.ok_root_abs_path=${ok_dir} -Dok.target_system_abs_path=${system_dir_path} \
-Dok.test_trace_prefix=${test_trace_prefix} \
-Dok.ticket_id=${ticket_id} oathkeeper.engine.tester.TestEngine"
(set -x;
timeout ${single_command_timeout_threshold} java -cp ${full_class_path} \
-Xmx8g \
-Dok.testname=${test_name} -Dok.invmode=dump -Dok.patchstate=${patchstate} \
-Dok.conf=${conf_file_realpath} -Dok.filediff="${diff_file_list}" -Dlog4j.configuration=${log4j_conf} \
-Dok.ok_root_abs_path=${ok_dir} -Dok.target_system_abs_path=${system_dir_path} \
-Dok.test_trace_prefix=${test_trace_prefix} \
-Dok.ticket_id=${ticket_id} oathkeeper.engine.tester.TestEngine
-Dok.ticket_id=${ticket_id} \
${jvm_args_for_tests} \
oathkeeper.engine.tester.TestEngine)

if [ $? -eq 124 ]
then
Expand Down Expand Up @@ -149,16 +145,12 @@ infer ()
ticket_id=$(basename $ticket_file_path)
ticket_id="${ticket_id%.*}"

echo "java -cp ${full_class_path} -Dok.conf=${conf_file_realpath} \
-Dok.ok_root_abs_path=${ok_dir} -Dok.target_system_abs_path=${system_dir_path} \
-Dok.ticket_id=${ticket_id} \
-Dok.template_version=${template_version} \
oathkeeper.engine.InferEngine ${test_trace_prefix}"
(set -x;
timeout ${single_command_timeout_threshold} java -cp ${full_class_path} -Dok.conf=${conf_file_realpath} \
-Dok.ok_root_abs_path=${ok_dir} -Dok.target_system_abs_path=${system_dir_path} \
-Dok.ticket_id=${ticket_id} \
-Dok.template_version=${template_version} \
oathkeeper.engine.InferEngine ${test_trace_prefix}
oathkeeper.engine.InferEngine ${test_trace_prefix})

if [ $? -eq 124 ]
then
Expand Down Expand Up @@ -188,16 +180,14 @@ verify ()
#recalculate once in case this case customize
full_class_path=${test_classes_dir_path}:${java_class_path}:${ok_lib}

echo "java -cp ${full_class_path} -Dok.invmode=${invmode} -Dok.invfile=${test_name} -Dok.patchstate=patched \
-Dok.conf=${conf_file_realpath} -Dlog4j.configuration=${log4j_conf} \
-Dok.ok_root_abs_path=${ok_dir} -Dok.target_system_abs_path=${system_dir_path} \
-Dok.ticket_id=${ticket_id} -Dok.verify_test_package=${verify_test_package} \
oathkeeper.engine.tester.TestEngine"
(set -x;
timeout ${single_command_timeout_threshold} java -cp ${full_class_path} -Dok.invmode=${invmode} -Dok.invfile=${test_name} -Dok.patchstate=patched \
-Dok.conf=${conf_file_realpath} -Dlog4j.configuration=${log4j_conf} \
-Dok.ok_root_abs_path=${ok_dir} -Dok.target_system_abs_path=${system_dir_path} \
-Dok.ticket_id=${ticket_id} -Dok.verify_test_package=${verify_test_package} \
oathkeeper.engine.tester.TestEngine
oathkeeper.engine.tester.TestEngine)
# jvm_args_for_tests does not need to be set here. TestEngine main mode
# will spawn child with jvm_args_for_tests according to properties file.

if [ $? -eq 124 ]
then
Expand Down
15 changes: 10 additions & 5 deletions src/main/java/oathkeeper/engine/tester/TestEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
import java.util.*;
import java.util.concurrent.TimeUnit;

/**
Expand Down Expand Up @@ -63,7 +62,7 @@ public int spawnProcess(String klass) throws IOException,

String rootPath = System.getProperty("user.dir");

ProcessBuilder builder = new ProcessBuilder(
List<String> cmds = new ArrayList<>(Arrays.asList(
javaBin, "-cp", classpath,
"-Dok.testname="+klass,
"-Dok.invmode="+System.getProperty("ok.invmode"),
Expand All @@ -78,7 +77,13 @@ public int spawnProcess(String klass) throws IOException,
"-Dok.target_system_abs_path="+System.getProperty("ok.target_system_abs_path"),
"-Dok.test_trace_prefix="+System.getProperty("ok.test_trace_prefix"),
"-Dok.verify_test_package="+System.getProperty("ok.verify_test_package"),
className);
));

String jvm_args = ConfigManager.config.getString(ConfigManager.JVM_ARGS_FOR_TESTS_KEY);
if (!jvm_args.equals(""))
cmds.addAll(Arrays.asList(jvm_args.split("\\s+")));
cmds.add(className);
ProcessBuilder builder = new ProcessBuilder(cmds);

Process process = builder.inheritIO().start();
//set the timeout threshold to be
Expand Down Expand Up @@ -209,4 +214,4 @@ else if(System.getProperty("ok.invmode").equals("verify_baremetal"))
}
}
}
}
}
6 changes: 6 additions & 0 deletions src/main/java/oathkeeper/runtime/ConfigManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ enum InstrumentMode
public static String SYSTEM_DIR_PATH_KEY = "system_dir_path";
public static String SYSTEM_PACKAGE_PREFIX_KEY = "system_package_prefix";
public static String TEST_CLASS_NAME_REGEX_KEY = "test_class_name_regex";
public static String JVM_ARGS_FOR_TESTS_KEY = "jvm_args_for_tests";
public static String SPECIFIED_TEST_CLASS_LIST_KEY = "specified_test_class_list";
public static String EXCLUDED_TEST_METHOD_LIST_KEY = "excluded_test_method_list";
public static String OP_INTERFACE_CLASS_LIST_KEY = "op_interface_class_list";
Expand Down Expand Up @@ -65,6 +66,10 @@ public void initConfig() {
String system_dir_path = config.getString(SYSTEM_DIR_PATH_KEY);
String prefix = config.getString(SYSTEM_PACKAGE_PREFIX_KEY);
String regex = config.getString(TEST_CLASS_NAME_REGEX_KEY);
// trim double quote
config.setProperty(JVM_ARGS_FOR_TESTS_KEY,
config.getString(JVM_ARGS_FOR_TESTS_KEY).replaceAll("^\"|\"$", ""));
String jvm_args = config.getString(JVM_ARGS_FOR_TESTS_KEY);
String[] specifiedClassList = config.getStringArray(SPECIFIED_TEST_CLASS_LIST_KEY);
String[] excludedMethodList = config.getStringArray(EXCLUDED_TEST_METHOD_LIST_KEY);
String[] interfaceClassList = config.getStringArray(OP_INTERFACE_CLASS_LIST_KEY);
Expand All @@ -89,6 +94,7 @@ public void initConfig() {
System.out.println(SYSTEM_DIR_PATH_KEY + ":" + system_dir_path);
System.out.println(SYSTEM_PACKAGE_PREFIX_KEY + ":" + prefix);
System.out.println(TEST_CLASS_NAME_REGEX_KEY + ":" + regex);
System.out.println(JVM_ARGS_FOR_TESTS_KEY + ":" + jvm_args);
System.out.println(SPECIFIED_TEST_CLASS_LIST_KEY + ":" + Arrays.toString(specifiedClassList));
System.out.println(EXCLUDED_TEST_METHOD_LIST_KEY + ":" + Arrays.toString(excludedMethodList));
System.out.println(OP_INTERFACE_CLASS_LIST_KEY + ":" + Arrays.toString(interfaceClassList));
Expand Down
Loading