Skip to content

Commit d2c48fa

Browse files
committed
Jenkins: increase splits for simulator-dtest to 2 (support for multiple splits is added) and for test-burn to 4
Patch by Dmitry Konstantinov; reviewed by Michael Semb Wever, Jyothsna Konisa for CASSANDRA-21082
1 parent e14816e commit d2c48fa

File tree

3 files changed

+51
-26
lines changed

3 files changed

+51
-26
lines changed

.build/run-tests.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ _main() {
285285
# check split_chunk is compatible with target (if not a regexp)
286286
if [[ "${_split_chunk}" =~ ^\d+/\d+$ ]] && [[ "1/1" != "${split_chunk}" ]] ; then
287287
case ${target} in
288-
"stress-test" | "fqltool-test" | "sstableloader-test" | "microbench" | "cqlsh-test" | "simulator-dtest")
289-
error 1 "Target ${target} does not suport splits."
288+
"stress-test" | "fqltool-test" | "sstableloader-test" | "microbench" | "cqlsh-test")
289+
error 1 "Target ${target} does not support splits."
290290
;;
291291
*)
292292
;;
@@ -377,7 +377,7 @@ _main() {
377377
_run_testlist "long" "testclasslist" "${test_name_regexp}" "${split_chunk}" "$(_timeout_for 'test.long.timeout')" "${repeat_count}"
378378
;;
379379
"simulator-dtest")
380-
ant test-simulator-dtest ${ANT_TEST_OPTS} || echo "failed ${target}"
380+
_run_testlist "simulator" "testclasslist-simulator" "${test_name_regexp}" "${split_chunk}" "$(_timeout_for 'test.simulation.timeout')" "${repeat_count}"
381381
;;
382382
"jvm-dtest" | "jvm-dtest-novnode")
383383
[ "jvm-dtest-novnode" == "${target}" ] || ANT_TEST_OPTS="${ANT_TEST_OPTS} -Dcassandra.dtest.num_tokens=16"

.jenkins/Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,13 @@ def tasks() {
188188
'test-latest': [splits: 20],
189189
'test-compression': [splits: 20],
190190
'stress-test': [splits: 1, size: 'small'],
191-
'test-burn': [splits: 2],
191+
'test-burn': [splits: 4],
192192
'long-test': [splits: 4],
193193
'test-oa': [splits: 20],
194194
'test-system-keyspace-directory': [splits: 20],
195195
'jvm-dtest': [splits: 16],
196196
'jvm-dtest-upgrade': [splits: 6],
197-
'simulator-dtest': [splits: 1, size: 'large'],
197+
'simulator-dtest': [splits: 2, size: 'large'],
198198
'dtest': [splits: 64, size: 'large'],
199199
'dtest-novnode': [splits: 64, size: 'large'],
200200
'dtest-latest': [splits: 64, size: 'large'],

build.xml

Lines changed: 46 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1792,6 +1792,13 @@
17921792
<property name="all-test-classes" refid="all-test-classes-path"/>
17931793
<testhelper testdelegate="testlist-system-keyspace-directory"/>
17941794
</target>
1795+
<target name="testclasslist-simulator" depends="maybe-build-test" description="Run tests given in file -Dtest.classlistfile (one-class-per-line, e.g. org/apache/cassandra/db/SomeTest.java)">
1796+
<path id="all-test-classes-path">
1797+
<fileset dir="${test.dir}/${test.classlistprefix}" includesfile="${test.classlistfile}"/>
1798+
</path>
1799+
<property name="all-test-classes" refid="all-test-classes-path"/>
1800+
<testhelper testdelegate="testlist-simulator"/>
1801+
</target>
17951802

17961803
<!-- Build a self-contained jar for e.g. remote execution; not currently used for running burn tests with this build script -->
17971804
<target name="burn-test-jar" depends="build-test, build" description="Create dtest-compatible jar, including all dependencies">
@@ -1857,32 +1864,50 @@
18571864
</testmacro>
18581865
</target>
18591866

1860-
<property name="simulator.asm.print" value="none"/> <!-- Supports: NONE, CLASS_SUMMARY, CLASS_DETAIL, METHOD_SUMMARY, METHOD_DETAIL, ASM; see org.apache.cassandra.simulator.asm.MethodLogger.Level -->
1867+
<property name="simulator.asm.print" value="none"/> <!-- Supports: NONE, CLASS_SUMMARY, CLASS_DETAIL, METHOD_SUMMARY, METHOD_DETAIL, ASM; see org.apache.cassandra.simulator.asm.MethodLogger.Level -->
1868+
<resources id="_simulator_jvmargs_items">
1869+
<string>-Djdk.attach.allowAttachSelf=true</string>
1870+
<string>-Dlogback.configurationFile=test/conf/logback-simulator.xml</string>
1871+
<string>-Dcassandra.ring_delay_ms=10000</string>
1872+
<string>-Dcassandra.tolerate_sstable_size=true</string>
1873+
<string>-Dcassandra.skip_sync=true</string>
1874+
<string>-Dcassandra.debugrefcount=false</string>
1875+
<string>-Dcassandra.test.simulator.determinismcheck=strict</string>
1876+
<string>-Dcassandra.test.simulator.print_asm=${simulator.asm.print}</string>
1877+
<!-- Support Simulator Tests -->
1878+
<string>-javaagent:${test.lib}/jars/simulator-asm.jar</string>
1879+
<string>-Xbootclasspath/a:${test.lib}/jars/simulator-bootstrap.jar</string>
1880+
<string>-XX:ActiveProcessorCount=4</string>
1881+
<string>-XX:-TieredCompilation</string>
1882+
<string>-XX:-BackgroundCompilation</string>
1883+
<string>-XX:CICompilerCount=1</string>
1884+
<string>-XX:Tier4CompileThreshold=1000</string>
1885+
<string>-XX:ReservedCodeCacheSize=256M</string>
1886+
<!-- total memory must fit within the pod constraints, see comments in .jenkins/Jenkinsfile and dind's container resourceRequestMemory in .jenkins/k8s/jenkins-deployment.yaml -->
1887+
<string>-Xmx8G</string>
1888+
<!-- Harry tests kept failing due to direct memory failures and looks like its undersized... so upping to allow more stable runs -->
1889+
<string>-XX:MaxDirectMemorySize=8G</string>
1890+
</resources>
1891+
<pathconvert property="_simulator.jvmargs_concat" refid="_simulator_jvmargs_items" pathsep=" "/>
1892+
18611893
<target name="test-simulator-dtest" depends="maybe-build-test" description="Execute simulator dtests">
18621894
<testmacro inputdir="${test.simulator-test.src}" timeout="${test.simulation.timeout}" forkmode="perTest" showoutput="true" filter="**/test/${test.name}.java" maxmemory="8g">
1863-
<jvmarg value="-Dlogback.configurationFile=test/conf/logback-simulator.xml"/>
1864-
<jvmarg value="-Dcassandra.ring_delay_ms=10000"/>
1865-
<jvmarg value="-Dcassandra.tolerate_sstable_size=true"/>
1866-
<jvmarg value="-Dcassandra.skip_sync=true" />
1867-
<jvmarg value="-Dcassandra.debugrefcount=false"/>
1868-
<jvmarg value="-Dcassandra.test.simulator.determinismcheck=strict"/>
1869-
<jvmarg value="-Dcassandra.test.simulator.print_asm=${simulator.asm.print}" />
1870-
<!-- Support Simulator Tests -->
1871-
<jvmarg line="-javaagent:${test.lib}/jars/simulator-asm.jar"/>
1872-
<jvmarg line="-Xbootclasspath/a:${test.lib}/jars/simulator-bootstrap.jar"/>
1873-
<jvmarg line="-XX:ActiveProcessorCount=4"/>
1874-
<jvmarg line="-XX:-TieredCompilation"/>
1875-
<jvmarg line="-XX:-BackgroundCompilation"/>
1876-
<jvmarg line="-XX:CICompilerCount=1"/>
1877-
<jvmarg line="-XX:Tier4CompileThreshold=1000"/>
1878-
<jvmarg line="-XX:ReservedCodeCacheSize=256M"/>
1879-
<!-- total memory must fit within the pod constraints, see comments in .jenkins/Jenkinsfile and dind's container resourceRequestMemory in .jenkins/k8s/jenkins-deployment.yaml -->
1880-
<jvmarg line="-Xmx8G"/>
1881-
<!-- Harry tests kept failing due to direct memory failures and looks like its undersized... so upping to allow more stable runs -->
1882-
<jvmarg line="-XX:MaxDirectMemorySize=8G"/>
1895+
<jvmarg line="${_simulator.jvmargs_concat}"/>
18831896
</testmacro>
18841897
</target>
18851898

1899+
<macrodef name="testlist-simulator">
1900+
<attribute name="test.file.list" />
1901+
<sequential>
1902+
<testmacrohelper inputdir="${test.simulator-test.src}" timeout="${test.timeout}"
1903+
forkmode="perTest" showoutput="true"
1904+
exclude="**/*.java" filelist="@{test.file.list}"
1905+
maxmemory="8g">
1906+
<jvmarg line="${_simulator.jvmargs_concat}"/>
1907+
</testmacrohelper>
1908+
</sequential>
1909+
</macrodef>
1910+
18861911
<!-- To run them you'll need to:
18871912
- `ant dtest-jar` on each version involved, including your current feature branch
18881913
- copy the build/dtest-*.jar for each version into your feature branch build folder

0 commit comments

Comments
 (0)