You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by mc...@apache.org on 2021/04/15 11:19:08 UTC

[cassandra] branch cassandra-3.0 updated (4164313 -> 2a6059e)

This is an automated email from the ASF dual-hosted git repository.

mck pushed a change to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


    from 4164313  Don't wait for migrations from removed nodes, mention flag to skip
     new 1185593  Remove test parallelism from ant build.xml
     new 2a6059e  Merge branch 'cassandra-2.2' into cassandra-3.0

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build.xml | 139 ++++++++------------------------------------------------------
 1 file changed, 18 insertions(+), 121 deletions(-)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


[cassandra] 01/01: Merge branch 'cassandra-2.2' into cassandra-3.0

Posted by mc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mck pushed a commit to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit 2a6059ef4ae0bcf491aa81a3eab9325282617381
Merge: 4164313 1185593
Author: Mick Semb Wever <mc...@apache.org>
AuthorDate: Thu Apr 15 12:58:59 2021 +0200

    Merge branch 'cassandra-2.2' into cassandra-3.0

 build.xml | 139 ++++++++------------------------------------------------------
 1 file changed, 18 insertions(+), 121 deletions(-)

diff --cc build.xml
index ad40e59,cbe45ba..9c778ae
--- a/build.xml
+++ b/build.xml
@@@ -1355,18 -1394,19 +1354,16 @@@
        <jvmarg value="-Dcassandra.tolerate_sstable_size=true"/>
        <jvmarg value="-Dcassandra.skip_sync=true" />
      </testmacro>
 -    <fileset dir="${test.unit.src}">
 -        <exclude name="**/pig/*.java" />
 -    </fileset>
 +    <fileset dir="${test.unit.src}" />
    </target>
  
-   <!-- Will not generate a junit report or fail on error since it is called in parallel for test-compression
-        That is taken care of by testparallel -->
+   <!-- Will not generate a junit report or fail on error  -->
    <macrodef name="testlist">
      <attribute name="test.file.list"/>
-     <attribute name="testlist.offset"/>
      <sequential>
-       <testmacrohelper inputdir="${test.dir}/${test.classlistprefix}" filelist="@{test.file.list}" poffset="@{testlist.offset}" exclude="**/*.java" timeout="${test.timeout}">
+       <testmacrohelper inputdir="${test.dir}/${test.classlistprefix}" filelist="@{test.file.list}" exclude="**/*.java" timeout="${test.timeout}">
          <jvmarg value="-Dlegacy-sstable-root=${test.data}/legacy-sstables"/>
          <jvmarg value="-Dinvalid-legacy-sstable-root=${test.data}/invalid-legacy-sstables"/>
 -        <jvmarg value="-Dcorrupt-sstable-root=${test.data}/corrupt-sstables"/>
          <jvmarg value="-Dmigration-sstable-root=${test.data}/migration-sstables"/>
          <jvmarg value="-Dcassandra.ring_delay_ms=1000"/>
          <jvmarg value="-Dcassandra.tolerate_sstable_size=true"/>
@@@ -1383,11 -1422,10 +1379,10 @@@
      <sequential>
        <property name="compressed_yaml" value="${build.test.dir}/cassandra.compressed.yaml"/>
        <concat destfile="${compressed_yaml}">
 -        <fileset file="${test.conf}/cassandra.yaml"/>
 -        <fileset file="${test.conf}/commitlog_compression.yaml"/>
 +          <fileset file="${test.conf}/cassandra.yaml"/>
 +          <fileset file="${test.conf}/commitlog_compression.yaml"/>
        </concat>
-       <testmacrohelper inputdir="${test.unit.src}" filelist="@{test.file.list}" poffset="@{testlist.offset}"
+       <testmacrohelper inputdir="${test.unit.src}" filelist="@{test.file.list}"
                         exclude="**/*.java" timeout="${test.timeout}" testtag="compression">
          <jvmarg value="-Dlegacy-sstable-root=${test.data}/legacy-sstables"/>
          <jvmarg value="-Dinvalid-legacy-sstable-root=${test.data}/invalid-legacy-sstables"/>
@@@ -1444,11 -1476,11 +1439,11 @@@
        <fileset file="${test.conf}/commitlog_compression.yaml"/>
      </concat>
      <path id="all-test-classes-path">
 -      <fileset dir="${test.unit.src}" excludes="**/pig/*.java" includes="**/${test.name}.java" />
 +      <fileset dir="${test.unit.src}" includes="**/${test.name}.java" />
        <fileset dir="${test.distributed.src}" includes="**/${test.name}.java" />
      </path>
-     <property name="all-test-classes" refid="all-test-classes-path"/>
-     <testparallel testdelegate="testlist-compression" />
+     <property name="test.file.list" refid="all-test-classes-path"/>
+     <testlist-compression test.file.list="${test.file.list}"/>
    </target>
  
    <target name="msg-ser-gen-test" depends="build-test" description="Generates message serializations">
@@@ -1687,111 -1763,12 +1682,12 @@@
      </sequential>
    </macrodef>
  
-   <!-- Run tests in parallel and report errors after and generate a junit report -->
-   <macrodef name="testparallel">
-     <attribute name="testdelegate"/>
-     <sequential>
-       <testparallelhelper testdelegate="@{testdelegate}"/>
-       <fail message="Some test(s) failed.">
-         <condition>
-             <and>
-             <isset property="testfailed"/>
-             <not>
-               <isset property="ant.test.failure.ignore"/>
-             </not>
-           </and>
-         </condition>
-       </fail>
-     </sequential>
-   </macrodef>
- 
-   <!-- Run multiple junit tasks in parallel, but don't track errors or generate a report after
-        If a test fails the testfailed property will be set. All the tests are run using te testdelegate
-        macro that is specified as an attribute and they will be run concurrently in this ant process -->
-   <scriptdef name="testparallelhelper" language="javascript">
-     <attribute name="testdelegate"/>
-     <![CDATA[
-         sep = project.getProperty("path.separator");
-         all = project.getProperty("all-test-classes").split(sep);
-         runners = project.getProperty("test.runners")
-         cores = project.getProperty("cores.count")
-         mem = project.getProperty("mem.size")
- 
-         numRunners = 1
-         if (runners != null) // there's test.runners override
-             numRunners = parseInt(runners) || 1;
-         else if (cores != null && mem != null) // only if cores and memory size is set
-             numRunners = Math.min(Math.floor(Math.sqrt(parseInt(cores) || 1)),
-                                   Math.floor((parseInt(mem) || 1)/(4*1024*1024*1024)));
- 
-         if (numRunners < 1)
-             numRunners = 1
- 
-         var echo = project.createTask("echo");
-         echo.setMessage("Number of test runners: " + numRunners);
-         echo.perform();
- 
-         var p = project.createTask('parallel');
-         p.setThreadCount(numRunners);
- 
-         for (i = 0; i < all.length; i++) {
- 
-             if (all[i] == undefined) continue;
- 
-             task = project.createTask( attributes.get("testdelegate") );
- 
-             task.setDynamicAttribute( "test.file.list", "" + all[i]);
- 
-             task.setDynamicAttribute( "testlist.offset", "" + i );
- 
-             p.addTask(task);
-         }
- 
-         p.perform();
-     ]]>
-   </scriptdef>
- 
-   <target name="get-cores">
-     <property environment="env"/>
-     <!-- support for Windows -->
-     <condition property="cores.count" value="${env.NUMBER_OF_PROCESSORS}">
-       <os family="windows" />
-     </condition>
-     <!-- support for Linux and Solaris (package SUNWgnu-coreutils is required) -->
-     <exec executable="nproc" outputproperty="cores.count" os="Linux,SunOS,Solaris" failifexecutionfails="false">
-       <arg value="--all"/>
-     </exec>
-     <!-- support for Mac OS X -->
-     <exec executable="sysctl" outputproperty="cores.count" os="Mac,Mac OS X,Darwin" failifexecutionfails="false">
-       <arg value="-n"/>
-       <arg value="hw.ncpu"/>
-     </exec>
-     <echo message="Number of cores: ${cores.count}"/>
-   </target>
- 
-   <target name="get-mem">
-     <condition property="mem.size" value="unknown">
-       <os family="windows" />
-     </condition>
-     <!-- support for Linux and Solaris (package SUNWgnu-coreutils is required) -->
-     <exec executable="bash" outputproperty="mem.size" os="Linux,SunOS,Solaris" failifexecutionfails="false">
-       <arg value="-c"/>
-       <arg value="free -b | grep Mem: | awk '{print $2}'"/>
-     </exec>
-     <!-- support for Mac OS X -->
-     <exec executable="sysctl" outputproperty="mem.size" os="Mac,Mac OS X,Darwin" failifexecutionfails="false">
-       <arg value="-n"/>
-       <arg value="hw.memsize"/>
-     </exec>
-     <echo message="Mem size : ${mem.size}"/>
-   </target>
- 
-   <target name="test" depends="eclipse-warnings,build-test,get-cores,get-mem" description="Parallel Test Runner">
+   <target name="test" depends="eclipse-warnings,build-test" description="Test Runner">
      <path id="all-test-classes-path">
 -      <fileset dir="${test.unit.src}" includes="**/${test.name}.java" excludes="**/pig/*.java **/distributed/test/UpgradeTest*.java" />
 +      <fileset dir="${test.unit.src}" includes="**/${test.name}.java" excludes="**/distributed/test/UpgradeTest*.java" />
      </path>
-     <property name="all-test-classes" refid="all-test-classes-path"/>
-     <testparallel testdelegate="testlist"/>
+     <property name="test.file.list" refid="all-test-classes-path"/>
+     <testlist test.file.list="${test.file.list}"/>
    </target>
  
    <target name="generate-test-report" description="Generates JUnit's HTML report from results already in build/output">
@@@ -1817,10 -1795,23 +1714,10 @@@
        <path id="all-test-classes-path">
            <fileset dir="${test.dir}/${test.classlistprefix}" includesfile="${test.classlistfile}"/>
        </path>
-       <property name="all-test-classes" refid="all-test-classes-path"/>
-       <testparallel testdelegate="testlist-compression"/>
+       <property name="test.file.list" refid="all-test-classes-path"/>
+       <testlist-compression test.file.list="${test.file.list}"/>
    </target>
  
 -  <target name="test-distributed" depends="build-test" description="Execute unit tests">
 -    <testmacro inputdir="${test.distributed.src}" timeout="${test.distributed.timeout}" forkmode="once" showoutput="true" filter="**/test/*Test.java">
 -      <jvmarg value="-Dlogback.configurationFile=test/conf/logback-dtest.xml"/>
 -      <jvmarg value="-Dcassandra.ring_delay_ms=1000"/>
 -      <jvmarg value="-Dcassandra.tolerate_sstable_size=true"/>
 -      <jvmarg value="-Dcassandra.skip_sync=true" />
 -      <jvmarg value="-XX:MaxMetaspaceSize=256M" />
 -      <jvmarg value="-XX:SoftRefLRUPolicyMSPerMB=0" />
 -      <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError" />
 -      <jvmarg value="-XX:HeapDumpPath=build/test/oom.hprof" />
 -    </testmacro>
 -  </target>
 -
    <target name="dtest-jar" depends="build-test, build" description="Create dtest-compatible jar, including all dependencies">
        <jar jarfile="${build.dir}/dtest-${base.version}.jar">
            <zipgroupfileset dir="${build.lib}" includes="*.jar" excludes="META-INF/*.SF"/>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org