Fix repeated tests on CircleCI and long-testsome/burn-testsome targets

Patch by Jacek Lewandowski; reviewed by Berenguer Blasi for CASSANDRA-19086
This commit is contained in:
Jacek Lewandowski 2023-11-30 09:42:48 +01:00
parent 50273d98e4
commit e1b0b44f9e
1 changed files with 23 additions and 4 deletions

View File

@ -175,6 +175,25 @@
<os family="windows" />
</condition>
<condition property="withoutMethods">
<and>
<equals arg1="${test.methods}" arg2=""/>
<not>
<contains string="${test.name}" substring="*"/>
</not>
</and>
</condition>
<condition property="withMethods">
<and>
<not>
<equals arg1="${test.methods}" arg2=""/>
</not>
<not>
<contains string="${test.name}" substring="*"/>
</not>
</and>
</condition>
<!-- Check if all tests are being run or just one. If it's all tests don't spam the console with test output.
If it's an individual test print the output from the test under the assumption someone is debugging the test
and wants to know what is going on without having to context switch to the log file that is generated.
@ -1609,8 +1628,8 @@
-->
<target name="long-testsome" depends="maybe-build-test" description="Execute specific long unit tests" >
<testmacro inputdir="${test.long.src}" timeout="${test.long.timeout}">
<test unless:blank="${test.methods}" name="${test.name}" methods="${test.methods}"/>
<test if:blank="${test.methods}" name="${test.name}"/>
<test if="withMethods" name="${test.name}" methods="${test.methods}" todir="${build.test.dir}/output/" outfile="TEST-${test.name}-${test.methods}"/>
<test if="withoutMethods" name="${test.name}" todir="${build.test.dir}/output/" outfile="TEST-${test.name}"/>
<jvmarg value="-Dcassandra.ring_delay_ms=1000"/>
<jvmarg value="-Dcassandra.tolerate_sstable_size=true"/>
</testmacro>
@ -1622,8 +1641,8 @@
-->
<target name="burn-testsome" depends="maybe-build-test" description="Execute specific burn unit tests" >
<testmacro inputdir="${test.burn.src}" timeout="${test.burn.timeout}">
<test unless:blank="${test.methods}" name="${test.name}" methods="${test.methods}"/>
<test if:blank="${test.methods}" name="${test.name}"/>
<test if="withMethods" name="${test.name}" methods="${test.methods}" todir="${build.test.dir}/output/" outfile="TEST-${test.name}-${test.methods}"/>
<test if="withoutMethods" name="${test.name}" todir="${build.test.dir}/output/" outfile="TEST-${test.name}"/>
<jvmarg value="-Dlogback.configurationFile=test/conf/logback-burntest.xml"/>
</testmacro>
</target>