diff --git a/CHANGES.txt b/CHANGES.txt index 8cf7f32425..c425c25b4f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -5,6 +5,7 @@ * Fix ColumnFilter behaviour to prevent digest mitmatches during upgrades (CASSANDRA-16415) * Avoid pushing schema mutations when setting up distributed system keyspaces locally (CASSANDRA-16387) Merged from 2.2: + * Remove ant targets list-jvm-dtests and ant list-jvm-upgrade-dtests (CASSANDRA-16519) * Fix centos packaging for arm64, >=4.0 rpm's now require python3 (CASSANDRA-16477) * Make TokenMetadata's ring version increments atomic (CASSANDRA-16286) diff --git a/build.xml b/build.xml index 4f1f32e5f6..ad40e59ede 100644 --- a/build.xml +++ b/build.xml @@ -65,9 +65,6 @@ - - - @@ -1824,27 +1821,6 @@ - - - - - - - - - - - - - - - - - - - - - @@ -1864,28 +1840,6 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/distributed/org/apache/cassandra/distributed/test/TestLocator.java b/test/distributed/org/apache/cassandra/distributed/test/TestLocator.java deleted file mode 100644 index e5669109e1..0000000000 --- a/test/distributed/org/apache/cassandra/distributed/test/TestLocator.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.cassandra.distributed.test; - -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.io.PrintWriter; -import java.lang.reflect.Method; -import java.net.URL; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.List; - -import org.junit.Test; - -public class TestLocator -{ - private static final String defaultOutputFileName = "run-jvm-dtests"; - private static final String testPackage = "org.apache.cassandra.distributed.test"; - private static final String testCommandFormat = "ant testsome -Dtest.name=%s -Dtest.methods=%s"; - - public static void main(String[] args) throws Throwable - { - String outputFileName = defaultOutputFileName; - if (args.length >= 1) - { - outputFileName = args[0]; - } - String testPackage = TestLocator.testPackage; - if (args.length == 2) - testPackage = args[1]; - try (FileWriter fileWriter = new FileWriter(outputFileName); - PrintWriter printWriter = new PrintWriter(fileWriter)) - { - printWriter.println("#!/bin/bash"); - printWriter.println("ret=0"); - for (Class testClass : locateClasses(testPackage)) - { - for (Method method : testClass.getMethods()) - { - if (method.getAnnotation(Test.class) == null) - continue; - - printWriter.println(String.format(testCommandFormat, - testClass.getName(), - method.getName())); - printWriter.println("if [ $? -ne 0 ]; then ret=1; fi"); - } - } - printWriter.println("exit $ret"); - } - } - - private static List locateClasses(String packageName) throws ClassNotFoundException, IOException - { - ClassLoader classLoader = TestLocator.class.getClassLoader(); - - Enumeration resources = classLoader.getResources(packageName.replace('.', '/')); - List classes = new ArrayList<>(); - while (resources.hasMoreElements()) - { - URL resource = resources.nextElement(); - loadClassesRecursively(new File(resource.getFile()), packageName, classes); - } - - return classes; - } - - - private static void loadClassesRecursively(File directory, String packageName, List classes) throws ClassNotFoundException - { - for (File file : directory.listFiles()) - { - if (file.isDirectory()) - loadClassesRecursively(file, packageName + "." + file.getName(), classes); - else if (file.getName().endsWith(".class")) - { - classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6))); - } - } - } -} \ No newline at end of file