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/03/12 14:50:31 UTC

[cassandra] branch trunk updated: Fix probable collision when running unit tests in parallel, and use runners on testclasslist* targets

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

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


The following commit(s) were added to refs/heads/trunk by this push:
     new 11d069a  Fix probable collision when running unit tests in parallel, and use runners on testclasslist* targets
11d069a is described below

commit 11d069a766a4a9a5db534a86de0175128431526f
Author: jacek-lewandowski <ja...@datastax.com>
AuthorDate: Thu Mar 11 15:41:35 2021 +0100

    Fix probable collision when running unit tests in parallel, and use runners on testclasslist* targets
    
     patch by Jacek Lewandowski; reviewed by Mick Semb Wever, Brandon Williams for CASSANDRA-16511
---
 build.xml                                                         | 8 ++++----
 test/conf/cassandra.yaml                                          | 2 +-
 .../unit/org/apache/cassandra/OffsetAwareConfigurationLoader.java | 3 +++
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/build.xml b/build.xml
index ecb1ad8..ee06a6d 100644
--- a/build.xml
+++ b/build.xml
@@ -2081,28 +2081,28 @@
   <!-- run a list of tests as provided in -Dtest.classlistfile (or default of 'testnames.txt')
   The class list file should be one test class per line, with the path starting after test/unit
   e.g. org/apache/cassandra/hints/HintMessageTest.java -->
-  <target name="testclasslist" depends="build-test" description="Parallel-run tests given in file -Dtest.classlistfile (one-class-per-line, e.g. org/apache/cassandra/db/SomeTest.java)">
+  <target name="testclasslist" depends="build-test,get-cores,get-mem" description="Parallel-run tests given in file -Dtest.classlistfile (one-class-per-line, e.g. org/apache/cassandra/db/SomeTest.java)">
     <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"/>
   </target>
-  <target name="testclasslist-compression" depends="build-test" description="Parallel-run tests given in file -Dtest.classlistfile (one-class-per-line, e.g. org/apache/cassandra/db/SomeTest.java)">
+  <target name="testclasslist-compression" depends="build-test,get-cores,get-mem" description="Parallel-run tests given in file -Dtest.classlistfile (one-class-per-line, e.g. org/apache/cassandra/db/SomeTest.java)">
       <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"/>
   </target>
-  <target name="testclasslist-cdc" depends="build-test" description="Parallel-run tests given in file -Dtest.classlistfile (one-class-per-line, e.g. org/apache/cassandra/db/SomeTest.java)">
+  <target name="testclasslist-cdc" depends="build-test,get-cores,get-mem" description="Parallel-run tests given in file -Dtest.classlistfile (one-class-per-line, e.g. org/apache/cassandra/db/SomeTest.java)">
       <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-cdc"/>
   </target>
-  <target name="testclasslist-system-keyspace-directory" depends="build-test" description="Parallel-run tests given in file -Dtest.classlistfile (one-class-per-line, e.g. org/apache/cassandra/db/SomeTest.java)">
+  <target name="testclasslist-system-keyspace-directory" depends="build-test,get-cores,get-mem" description="Parallel-run tests given in file -Dtest.classlistfile (one-class-per-line, e.g. org/apache/cassandra/db/SomeTest.java)">
       <path id="all-test-classes-path">
           <fileset dir="${test.dir}/${test.classlistprefix}" includesfile="${test.classlistfile}"/>
       </path>
diff --git a/test/conf/cassandra.yaml b/test/conf/cassandra.yaml
index 38e012f..7e5ef79 100644
--- a/test/conf/cassandra.yaml
+++ b/test/conf/cassandra.yaml
@@ -17,7 +17,7 @@ hints_directory: build/test/cassandra/hints
 partitioner: org.apache.cassandra.dht.ByteOrderedPartitioner
 listen_address: 127.0.0.1
 storage_port: 7012
-ssl_storage_port: 7011
+ssl_storage_port: 17012
 start_native_transport: true
 native_transport_port: 9042
 column_index_size_in_kb: 4
diff --git a/test/unit/org/apache/cassandra/OffsetAwareConfigurationLoader.java b/test/unit/org/apache/cassandra/OffsetAwareConfigurationLoader.java
index 27246aa..fce677f 100644
--- a/test/unit/org/apache/cassandra/OffsetAwareConfigurationLoader.java
+++ b/test/unit/org/apache/cassandra/OffsetAwareConfigurationLoader.java
@@ -56,7 +56,10 @@ public class OffsetAwareConfigurationLoader extends YamlConfigurationLoader
 
         String sep = File.pathSeparator;
 
+        assert offset < 2000;
         config.native_transport_port += offset;
+        if (config.native_transport_port_ssl != null)
+            config.native_transport_port_ssl += offset;
         config.storage_port += offset;
         config.ssl_storage_port += offset;
 


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