diff --git a/test/distributed/org/apache/cassandra/distributed/test/sai/MultiNodeExecutor.java b/test/distributed/org/apache/cassandra/distributed/test/sai/datamodels/MultiNodeExecutor.java similarity index 91% rename from test/distributed/org/apache/cassandra/distributed/test/sai/MultiNodeExecutor.java rename to test/distributed/org/apache/cassandra/distributed/test/sai/datamodels/MultiNodeExecutor.java index 562baa38491c..e038b52ca53b 100644 --- a/test/distributed/org/apache/cassandra/distributed/test/sai/MultiNodeExecutor.java +++ b/test/distributed/org/apache/cassandra/distributed/test/sai/datamodels/MultiNodeExecutor.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package org.apache.cassandra.distributed.test.sai; +package org.apache.cassandra.distributed.test.sai.datamodels; import java.util.ArrayList; import java.util.Iterator; @@ -25,8 +25,9 @@ import org.apache.cassandra.db.Keyspace; import org.apache.cassandra.distributed.Cluster; import org.apache.cassandra.distributed.api.ConsistencyLevel; +import org.apache.cassandra.distributed.test.sai.SAIUtil; import org.apache.cassandra.distributed.util.ColumnTypeUtil; -import org.apache.cassandra.index.sai.cql.DataModel; +import org.apache.cassandra.index.sai.cql.datamodels.DataModel; public class MultiNodeExecutor implements DataModel.Executor { @@ -89,12 +90,12 @@ public List executeRemote(String query, int fetchSize, Object... values) @Override public void counterReset() { - AbstractQueryTester.Counter.reset(); + MultiNodeQueryTester.Counter.reset(); } @Override public long getCounter() { - return AbstractQueryTester.Counter.get(); + return MultiNodeQueryTester.Counter.get(); } } diff --git a/test/distributed/org/apache/cassandra/distributed/test/sai/AbstractQueryTester.java b/test/distributed/org/apache/cassandra/distributed/test/sai/datamodels/MultiNodeQueryTester.java similarity index 93% rename from test/distributed/org/apache/cassandra/distributed/test/sai/AbstractQueryTester.java rename to test/distributed/org/apache/cassandra/distributed/test/sai/datamodels/MultiNodeQueryTester.java index 76fe555a871c..1a9b8a1e15e0 100644 --- a/test/distributed/org/apache/cassandra/distributed/test/sai/AbstractQueryTester.java +++ b/test/distributed/org/apache/cassandra/distributed/test/sai/datamodels/MultiNodeQueryTester.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package org.apache.cassandra.distributed.test.sai; +package org.apache.cassandra.distributed.test.sai.datamodels; import java.util.LinkedList; import java.util.List; @@ -33,12 +33,12 @@ import org.apache.cassandra.distributed.api.Feature; import org.apache.cassandra.distributed.shared.Byteman; import org.apache.cassandra.distributed.test.TestBaseImpl; -import org.apache.cassandra.index.sai.cql.DataModel; -import org.apache.cassandra.index.sai.cql.IndexQuerySupport; +import org.apache.cassandra.index.sai.cql.datamodels.DataModel; +import org.apache.cassandra.index.sai.cql.datamodels.IndexQuerySupport; import org.apache.cassandra.utils.Shared; @RunWith(Parameterized.class) -public class AbstractQueryTester extends TestBaseImpl +abstract class MultiNodeQueryTester extends TestBaseImpl { protected static final String INJECTION_SCRIPT = "RULE count searches\n" + "CLASS org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher\n" + @@ -46,7 +46,7 @@ public class AbstractQueryTester extends TestBaseImpl "AT ENTRY\n" + "IF TRUE\n" + "DO\n" + - " org.apache.cassandra.distributed.test.sai.AbstractQueryTester$Counter.increment()\n" + + " org.apache.cassandra.distributed.test.sai.datamodels.MultiNodeQueryTester$Counter.increment()\n" + "ENDRULE\n"; @Parameterized.Parameter(0) diff --git a/test/distributed/org/apache/cassandra/distributed/test/sai/QueryCellDeletionsTest.java b/test/distributed/org/apache/cassandra/distributed/test/sai/datamodels/QueryCellDeletionsTest.java similarity index 83% rename from test/distributed/org/apache/cassandra/distributed/test/sai/QueryCellDeletionsTest.java rename to test/distributed/org/apache/cassandra/distributed/test/sai/datamodels/QueryCellDeletionsTest.java index 0727364763e5..93abd062f061 100644 --- a/test/distributed/org/apache/cassandra/distributed/test/sai/QueryCellDeletionsTest.java +++ b/test/distributed/org/apache/cassandra/distributed/test/sai/datamodels/QueryCellDeletionsTest.java @@ -16,13 +16,13 @@ * limitations under the License. */ -package org.apache.cassandra.distributed.test.sai; +package org.apache.cassandra.distributed.test.sai.datamodels; import org.junit.Test; -import org.apache.cassandra.index.sai.cql.IndexQuerySupport; +import org.apache.cassandra.index.sai.cql.datamodels.IndexQuerySupport; -public class QueryCellDeletionsTest extends AbstractQueryTester +public class QueryCellDeletionsTest extends MultiNodeQueryTester { @Test public void testCellDeletions() throws Throwable diff --git a/test/distributed/org/apache/cassandra/distributed/test/sai/QueryRowDeletionsTest.java b/test/distributed/org/apache/cassandra/distributed/test/sai/datamodels/QueryRowDeletionsTest.java similarity index 83% rename from test/distributed/org/apache/cassandra/distributed/test/sai/QueryRowDeletionsTest.java rename to test/distributed/org/apache/cassandra/distributed/test/sai/datamodels/QueryRowDeletionsTest.java index 5950bcfcbd2d..f1f063f611ae 100644 --- a/test/distributed/org/apache/cassandra/distributed/test/sai/QueryRowDeletionsTest.java +++ b/test/distributed/org/apache/cassandra/distributed/test/sai/datamodels/QueryRowDeletionsTest.java @@ -16,13 +16,13 @@ * limitations under the License. */ -package org.apache.cassandra.distributed.test.sai; +package org.apache.cassandra.distributed.test.sai.datamodels; import org.junit.Test; -import org.apache.cassandra.index.sai.cql.IndexQuerySupport; +import org.apache.cassandra.index.sai.cql.datamodels.IndexQuerySupport; -public class QueryRowDeletionsTest extends AbstractQueryTester +public class QueryRowDeletionsTest extends MultiNodeQueryTester { @Test public void testRowDeletions() throws Throwable diff --git a/test/distributed/org/apache/cassandra/distributed/test/sai/QueryTimeToLiveTest.java b/test/distributed/org/apache/cassandra/distributed/test/sai/datamodels/QueryTimeToLiveTest.java similarity index 83% rename from test/distributed/org/apache/cassandra/distributed/test/sai/QueryTimeToLiveTest.java rename to test/distributed/org/apache/cassandra/distributed/test/sai/datamodels/QueryTimeToLiveTest.java index 5f0a84fde39c..9e223767c07e 100644 --- a/test/distributed/org/apache/cassandra/distributed/test/sai/QueryTimeToLiveTest.java +++ b/test/distributed/org/apache/cassandra/distributed/test/sai/datamodels/QueryTimeToLiveTest.java @@ -16,13 +16,13 @@ * limitations under the License. */ -package org.apache.cassandra.distributed.test.sai; +package org.apache.cassandra.distributed.test.sai.datamodels; import org.junit.Test; -import org.apache.cassandra.index.sai.cql.IndexQuerySupport; +import org.apache.cassandra.index.sai.cql.datamodels.IndexQuerySupport; -public class QueryTimeToLiveTest extends AbstractQueryTester +public class QueryTimeToLiveTest extends MultiNodeQueryTester { @Test public void testTimeToLive() throws Throwable diff --git a/test/distributed/org/apache/cassandra/distributed/test/sai/QueryWriteLifecycleTest.java b/test/distributed/org/apache/cassandra/distributed/test/sai/datamodels/QueryWriteLifecycleTest.java similarity index 83% rename from test/distributed/org/apache/cassandra/distributed/test/sai/QueryWriteLifecycleTest.java rename to test/distributed/org/apache/cassandra/distributed/test/sai/datamodels/QueryWriteLifecycleTest.java index cbda82ec2f99..83525f703c4c 100644 --- a/test/distributed/org/apache/cassandra/distributed/test/sai/QueryWriteLifecycleTest.java +++ b/test/distributed/org/apache/cassandra/distributed/test/sai/datamodels/QueryWriteLifecycleTest.java @@ -16,13 +16,13 @@ * limitations under the License. */ -package org.apache.cassandra.distributed.test.sai; +package org.apache.cassandra.distributed.test.sai.datamodels; import org.junit.Test; -import org.apache.cassandra.index.sai.cql.IndexQuerySupport; +import org.apache.cassandra.index.sai.cql.datamodels.IndexQuerySupport; -public class QueryWriteLifecycleTest extends AbstractQueryTester +public class QueryWriteLifecycleTest extends MultiNodeQueryTester { @Test public void testWriteLifecycle() throws Throwable diff --git a/test/unit/org/apache/cassandra/dht/RangeIntersectsBoundsTest.java b/test/unit/org/apache/cassandra/dht/RangeIntersectsBoundsTest.java index 5fb6ceb816d7..a60633707d70 100644 --- a/test/unit/org/apache/cassandra/dht/RangeIntersectsBoundsTest.java +++ b/test/unit/org/apache/cassandra/dht/RangeIntersectsBoundsTest.java @@ -23,7 +23,6 @@ import org.apache.cassandra.config.DatabaseDescriptor; import org.apache.cassandra.dht.RandomPartitioner.BigIntegerToken; -import org.apache.cassandra.index.sai.cql.DataModel; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; diff --git a/test/unit/org/apache/cassandra/index/sai/cql/DataModel.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/DataModel.java similarity index 99% rename from test/unit/org/apache/cassandra/index/sai/cql/DataModel.java rename to test/unit/org/apache/cassandra/index/sai/cql/datamodels/DataModel.java index 23680581ff71..6c31d7f006fd 100644 --- a/test/unit/org/apache/cassandra/index/sai/cql/DataModel.java +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/DataModel.java @@ -1,5 +1,4 @@ /* - * * 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 @@ -16,9 +15,8 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * */ -package org.apache.cassandra.index.sai.cql; +package org.apache.cassandra.index.sai.cql.datamodels; import java.util.Collections; import java.util.List; diff --git a/test/unit/org/apache/cassandra/index/sai/cql/IndexQuerySupport.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/IndexQuerySupport.java similarity index 98% rename from test/unit/org/apache/cassandra/index/sai/cql/IndexQuerySupport.java rename to test/unit/org/apache/cassandra/index/sai/cql/datamodels/IndexQuerySupport.java index 0c9a818fe6f6..2e82872e112f 100644 --- a/test/unit/org/apache/cassandra/index/sai/cql/IndexQuerySupport.java +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/IndexQuerySupport.java @@ -1,5 +1,4 @@ /* - * * 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 @@ -8,17 +7,15 @@ * "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. + * 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.index.sai.cql; +package org.apache.cassandra.index.sai.cql.datamodels; import java.util.Arrays; import java.util.List; @@ -41,7 +38,7 @@ import org.hamcrest.Matchers; import static org.apache.cassandra.distributed.test.TestBaseImpl.list; -import static org.apache.cassandra.index.sai.cql.DataModel.INET_COLUMN; +import static org.apache.cassandra.index.sai.cql.datamodels.DataModel.INET_COLUMN; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; diff --git a/test/unit/org/apache/cassandra/index/sai/cql/QueryCellDeletionsTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryCellDeletionsTester.java similarity index 86% rename from test/unit/org/apache/cassandra/index/sai/cql/QueryCellDeletionsTest.java rename to test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryCellDeletionsTester.java index 6b423580e3bd..f9aa03d008bb 100644 --- a/test/unit/org/apache/cassandra/index/sai/cql/QueryCellDeletionsTest.java +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryCellDeletionsTester.java @@ -15,11 +15,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.cassandra.index.sai.cql; +package org.apache.cassandra.index.sai.cql.datamodels; +import org.junit.Ignore; import org.junit.Test; -public class QueryCellDeletionsTest extends AbstractQueryTester +@Ignore +abstract class QueryCellDeletionsTester extends SingleNodeQueryTester { @Test public void testCellDeletions() throws Throwable diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryCellDeletionsWithBaseDataModelTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryCellDeletionsWithBaseDataModelTest.java new file mode 100644 index 000000000000..616091613ffd --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryCellDeletionsWithBaseDataModelTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class QueryCellDeletionsWithBaseDataModelTest extends QueryCellDeletionsTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::baseDataModelParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryCellDeletionsWithCompositePartitionKeyTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryCellDeletionsWithCompositePartitionKeyTest.java new file mode 100644 index 000000000000..ff4040422a62 --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryCellDeletionsWithCompositePartitionKeyTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class QueryCellDeletionsWithCompositePartitionKeyTest extends QueryCellDeletionsTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compositePartitionKeyParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryCellDeletionsWithCompoundKeyTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryCellDeletionsWithCompoundKeyTest.java new file mode 100644 index 000000000000..199242e406db --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryCellDeletionsWithCompoundKeyTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class QueryCellDeletionsWithCompoundKeyTest extends QueryCellDeletionsTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compoundKeyParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryCellDeletionsWithCompoundKeyWithStaticsTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryCellDeletionsWithCompoundKeyWithStaticsTest.java new file mode 100644 index 000000000000..cf89805d6d49 --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryCellDeletionsWithCompoundKeyWithStaticsTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class QueryCellDeletionsWithCompoundKeyWithStaticsTest extends QueryCellDeletionsTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compoundKeyWithStaticsParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/QueryRowDeletionsTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryRowDeletionsTester.java similarity index 86% rename from test/unit/org/apache/cassandra/index/sai/cql/QueryRowDeletionsTest.java rename to test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryRowDeletionsTester.java index a5a843d99e4d..97e0073bde8c 100644 --- a/test/unit/org/apache/cassandra/index/sai/cql/QueryRowDeletionsTest.java +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryRowDeletionsTester.java @@ -15,11 +15,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.cassandra.index.sai.cql; +package org.apache.cassandra.index.sai.cql.datamodels; +import org.junit.Ignore; import org.junit.Test; -public class QueryRowDeletionsTest extends AbstractQueryTester +@Ignore +abstract class QueryRowDeletionsTester extends SingleNodeQueryTester { @Test public void testRowDeletions() throws Throwable diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryRowDeletionsWithBaseModelTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryRowDeletionsWithBaseModelTest.java new file mode 100644 index 000000000000..8870750ded36 --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryRowDeletionsWithBaseModelTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class QueryRowDeletionsWithBaseModelTest extends QueryRowDeletionsTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::baseDataModelParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryRowDeletionsWithCompositePartitionKeyTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryRowDeletionsWithCompositePartitionKeyTest.java new file mode 100644 index 000000000000..06aa3a208c9b --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryRowDeletionsWithCompositePartitionKeyTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class QueryRowDeletionsWithCompositePartitionKeyTest extends QueryRowDeletionsTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compositePartitionKeyParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryRowDeletionsWithCompoundKeyTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryRowDeletionsWithCompoundKeyTest.java new file mode 100644 index 000000000000..05875ddac645 --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryRowDeletionsWithCompoundKeyTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class QueryRowDeletionsWithCompoundKeyTest extends QueryRowDeletionsTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compoundKeyParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryRowDeletionsWithCompoundKeyWithStaticsTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryRowDeletionsWithCompoundKeyWithStaticsTest.java new file mode 100644 index 000000000000..8a1731bf5d2d --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryRowDeletionsWithCompoundKeyWithStaticsTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class QueryRowDeletionsWithCompoundKeyWithStaticsTest extends QueryRowDeletionsTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compoundKeyWithStaticsParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/QueryTimeToLiveTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryTimeToLiveTester.java similarity index 86% rename from test/unit/org/apache/cassandra/index/sai/cql/QueryTimeToLiveTest.java rename to test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryTimeToLiveTester.java index 39a77b496c48..e2d19406ef89 100644 --- a/test/unit/org/apache/cassandra/index/sai/cql/QueryTimeToLiveTest.java +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryTimeToLiveTester.java @@ -15,11 +15,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.cassandra.index.sai.cql; +package org.apache.cassandra.index.sai.cql.datamodels; +import org.junit.Ignore; import org.junit.Test; -public class QueryTimeToLiveTest extends AbstractQueryTester +@Ignore +abstract class QueryTimeToLiveTester extends SingleNodeQueryTester { @Test public void testTimeToLive() throws Throwable diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryTimeToLiveWithBaseModelTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryTimeToLiveWithBaseModelTest.java new file mode 100644 index 000000000000..878193fa0c9c --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryTimeToLiveWithBaseModelTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class QueryTimeToLiveWithBaseModelTest extends QueryTimeToLiveTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::baseDataModelParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryTimeToLiveWithCompositePartitionKeyTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryTimeToLiveWithCompositePartitionKeyTest.java new file mode 100644 index 000000000000..af5341637e3f --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryTimeToLiveWithCompositePartitionKeyTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class QueryTimeToLiveWithCompositePartitionKeyTest extends QueryTimeToLiveTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compositePartitionKeyParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryTimeToLiveWithCompoundKeyTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryTimeToLiveWithCompoundKeyTest.java new file mode 100644 index 000000000000..b05a3bd72863 --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryTimeToLiveWithCompoundKeyTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class QueryTimeToLiveWithCompoundKeyTest extends QueryTimeToLiveTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compoundKeyParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryTimeToLiveWithCompoundKeyWithStaticsTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryTimeToLiveWithCompoundKeyWithStaticsTest.java new file mode 100644 index 000000000000..d080aa65a101 --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryTimeToLiveWithCompoundKeyWithStaticsTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class QueryTimeToLiveWithCompoundKeyWithStaticsTest extends QueryTimeToLiveTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compoundKeyWithStaticsParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/QueryWriteLifecycleTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryWriteLifecycleTester.java similarity index 86% rename from test/unit/org/apache/cassandra/index/sai/cql/QueryWriteLifecycleTest.java rename to test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryWriteLifecycleTester.java index a41ff47f5f86..047ebfd12e79 100644 --- a/test/unit/org/apache/cassandra/index/sai/cql/QueryWriteLifecycleTest.java +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryWriteLifecycleTester.java @@ -15,11 +15,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.cassandra.index.sai.cql; +package org.apache.cassandra.index.sai.cql.datamodels; +import org.junit.Ignore; import org.junit.Test; -public class QueryWriteLifecycleTest extends AbstractQueryTester +@Ignore +abstract class QueryWriteLifecycleTester extends SingleNodeQueryTester { @Test public void testWriteLifecycle() throws Throwable diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryWriteLifecycleWithBaseModelTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryWriteLifecycleWithBaseModelTest.java new file mode 100644 index 000000000000..693a0b2eafad --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryWriteLifecycleWithBaseModelTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class QueryWriteLifecycleWithBaseModelTest extends QueryWriteLifecycleTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::baseDataModelParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryWriteLifecycleWithCompositePartitionKeyTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryWriteLifecycleWithCompositePartitionKeyTest.java new file mode 100644 index 000000000000..54c4fe811fc2 --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryWriteLifecycleWithCompositePartitionKeyTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class QueryWriteLifecycleWithCompositePartitionKeyTest extends QueryWriteLifecycleTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compositePartitionKeyParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryWriteLifecycleWithCompoundKeyTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryWriteLifecycleWithCompoundKeyTest.java new file mode 100644 index 000000000000..e0af8b81b3cf --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryWriteLifecycleWithCompoundKeyTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class QueryWriteLifecycleWithCompoundKeyTest extends QueryWriteLifecycleTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compoundKeyParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryWriteLifecycleWithCompoundKeyWithStaticsTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryWriteLifecycleWithCompoundKeyWithStaticsTest.java new file mode 100644 index 000000000000..16fc90db3724 --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/QueryWriteLifecycleWithCompoundKeyWithStaticsTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class QueryWriteLifecycleWithCompoundKeyWithStaticsTest extends QueryWriteLifecycleTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compoundKeyWithStaticsParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/SingleNodeExecutor.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/SingleNodeExecutor.java similarity index 97% rename from test/unit/org/apache/cassandra/index/sai/cql/SingleNodeExecutor.java rename to test/unit/org/apache/cassandra/index/sai/cql/datamodels/SingleNodeExecutor.java index 6ca04929d0a0..ba898b263dc3 100644 --- a/test/unit/org/apache/cassandra/index/sai/cql/SingleNodeExecutor.java +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/SingleNodeExecutor.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package org.apache.cassandra.index.sai.cql; +package org.apache.cassandra.index.sai.cql.datamodels; import java.util.List; import java.util.stream.Collectors; diff --git a/test/unit/org/apache/cassandra/index/sai/cql/AbstractQueryTester.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/SingleNodeQueryTester.java similarity index 56% rename from test/unit/org/apache/cassandra/index/sai/cql/AbstractQueryTester.java rename to test/unit/org/apache/cassandra/index/sai/cql/datamodels/SingleNodeQueryTester.java index d828bb23b2ea..7e60de2f604f 100644 --- a/test/unit/org/apache/cassandra/index/sai/cql/AbstractQueryTester.java +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/SingleNodeQueryTester.java @@ -16,14 +16,16 @@ * limitations under the License. */ -package org.apache.cassandra.index.sai.cql; +package org.apache.cassandra.index.sai.cql.datamodels; import java.util.LinkedList; import java.util.List; +import java.util.function.Function; import com.google.common.collect.ImmutableList; import org.junit.After; import org.junit.Before; +import org.junit.Ignore; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; @@ -35,8 +37,9 @@ import static org.apache.cassandra.inject.InvokePointBuilder.newInvokePoint; +@Ignore @RunWith(Parameterized.class) -public class AbstractQueryTester extends SAITester +abstract class SingleNodeQueryTester extends SAITester { protected static final Injections.Counter INDEX_QUERY_COUNTER = Injections.newCounter("IndexQueryCounter") .add(newInvokePoint().onClass(StorageAttachedIndexSearcher.class).onMethod("search")) @@ -73,10 +76,20 @@ public void teardown() throws Throwable SAIUtil.setLatestVersion(latest); } - - @SuppressWarnings("unused") @Parameterized.Parameters(name = "{0}_{1}") - public static List params() throws Throwable + public static List allParams() + { + List scenarios = new LinkedList<>(); + + scenarios.addAll(allIndexVersionsParams(SingleNodeQueryTester::baseDataModelParams)); + scenarios.addAll(allIndexVersionsParams(SingleNodeQueryTester::compoundKeyParams)); + scenarios.addAll(allIndexVersionsParams(SingleNodeQueryTester::compoundKeyWithStaticsParams)); + scenarios.addAll(allIndexVersionsParams(SingleNodeQueryTester::compositePartitionKeyParams)); + + return scenarios; + } + + protected static List allIndexVersionsParams(Function params) { List scenarios = new LinkedList<>(); @@ -86,14 +99,40 @@ public static List params() throws Throwable if (version.equals(Version.BA)) continue; - scenarios.add(new Object[]{ version, new DataModel.BaseDataModel(DataModel.NORMAL_COLUMNS, DataModel.NORMAL_COLUMN_DATA), IndexQuerySupport.BASE_QUERY_SETS }); - scenarios.add(new Object[]{ version, new DataModel.CompoundKeyDataModel(DataModel.NORMAL_COLUMNS, DataModel.NORMAL_COLUMN_DATA), IndexQuerySupport.BASE_QUERY_SETS }); - scenarios.add(new Object[]{ version, new DataModel.CompoundKeyWithStaticsDataModel(DataModel.STATIC_COLUMNS, DataModel.STATIC_COLUMN_DATA), IndexQuerySupport.STATIC_QUERY_SETS }); - scenarios.add(new Object[]{ version, new DataModel.CompositePartitionKeyDataModel(DataModel.NORMAL_COLUMNS, DataModel.NORMAL_COLUMN_DATA), - ImmutableList.builder().addAll(IndexQuerySupport.BASE_QUERY_SETS).addAll(IndexQuerySupport.COMPOSITE_PARTITION_QUERY_SETS).build()}); - + scenarios.add(params.apply(version)); } return scenarios; } + + protected static Object[] baseDataModelParams(Version version) + { + return new Object[]{ version, + new DataModel.BaseDataModel(DataModel.NORMAL_COLUMNS, DataModel.NORMAL_COLUMN_DATA), + IndexQuerySupport.BASE_QUERY_SETS}; + } + + protected static Object[] compoundKeyParams(Version version) + { + return new Object[]{ version, + new DataModel.CompoundKeyDataModel(DataModel.NORMAL_COLUMNS, DataModel.NORMAL_COLUMN_DATA), + IndexQuerySupport.BASE_QUERY_SETS}; + } + + protected static Object[] compoundKeyWithStaticsParams(Version version) + { + return new Object[]{ version, + new DataModel.CompoundKeyWithStaticsDataModel(DataModel.STATIC_COLUMNS, DataModel.STATIC_COLUMN_DATA), + IndexQuerySupport.STATIC_QUERY_SETS}; + } + + protected static Object[] compositePartitionKeyParams(Version version) + { + return new Object[]{ version, + new DataModel.CompositePartitionKeyDataModel(DataModel.NORMAL_COLUMNS, DataModel.NORMAL_COLUMN_DATA), + ImmutableList.builder() + .addAll(IndexQuerySupport.BASE_QUERY_SETS) + .addAll(IndexQuerySupport.COMPOSITE_PARTITION_QUERY_SETS) + .build() }; + } } diff --git a/test/unit/org/apache/cassandra/index/sai/cql/TinySegmentQueryCellDeletionsTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryCellDeletionsTester.java similarity index 85% rename from test/unit/org/apache/cassandra/index/sai/cql/TinySegmentQueryCellDeletionsTest.java rename to test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryCellDeletionsTester.java index d9c364d63b3e..d2b756f8fc61 100644 --- a/test/unit/org/apache/cassandra/index/sai/cql/TinySegmentQueryCellDeletionsTest.java +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryCellDeletionsTester.java @@ -15,9 +15,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.cassandra.index.sai.cql; +package org.apache.cassandra.index.sai.cql.datamodels; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.apache.cassandra.config.DatabaseDescriptor; @@ -25,10 +26,11 @@ /** * Force generates segments due to a small RAM size on compaction, to test segment splitting */ -public class TinySegmentQueryCellDeletionsTest extends AbstractQueryTester +@Ignore +abstract class TinySegmentQueryCellDeletionsTester extends SingleNodeQueryTester { @Before - public void setSegmentWriteBufferSpace() throws Throwable + public void setSegmentWriteBufferSpace() { DatabaseDescriptor.setSAISegmentWriteBufferSpace(0); } diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryCellDeletionsWithBaseModelTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryCellDeletionsWithBaseModelTest.java new file mode 100644 index 000000000000..b3d470d4181f --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryCellDeletionsWithBaseModelTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class TinySegmentQueryCellDeletionsWithBaseModelTest extends TinySegmentQueryCellDeletionsTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::baseDataModelParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryCellDeletionsWithCompositePartitionKeyTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryCellDeletionsWithCompositePartitionKeyTest.java new file mode 100644 index 000000000000..05bbde9eecea --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryCellDeletionsWithCompositePartitionKeyTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class TinySegmentQueryCellDeletionsWithCompositePartitionKeyTest extends TinySegmentQueryCellDeletionsTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compositePartitionKeyParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryCellDeletionsWithCompoundKeyTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryCellDeletionsWithCompoundKeyTest.java new file mode 100644 index 000000000000..3d26492fba44 --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryCellDeletionsWithCompoundKeyTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class TinySegmentQueryCellDeletionsWithCompoundKeyTest extends TinySegmentQueryCellDeletionsTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compoundKeyParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryCellDeletionsWithCompoundKeyWithStaticsTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryCellDeletionsWithCompoundKeyWithStaticsTest.java new file mode 100644 index 000000000000..651f286aff5a --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryCellDeletionsWithCompoundKeyWithStaticsTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class TinySegmentQueryCellDeletionsWithCompoundKeyWithStaticsTest extends TinySegmentQueryCellDeletionsTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compoundKeyWithStaticsParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/TinySegmentQueryRowDeletionsTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryRowDeletionsTester.java similarity index 85% rename from test/unit/org/apache/cassandra/index/sai/cql/TinySegmentQueryRowDeletionsTest.java rename to test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryRowDeletionsTester.java index 303f299bc168..8e7bce78d9d0 100644 --- a/test/unit/org/apache/cassandra/index/sai/cql/TinySegmentQueryRowDeletionsTest.java +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryRowDeletionsTester.java @@ -15,9 +15,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.cassandra.index.sai.cql; +package org.apache.cassandra.index.sai.cql.datamodels; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.apache.cassandra.config.DatabaseDescriptor; @@ -25,10 +26,11 @@ /** * Force generates segments due to a small RAM size on compaction, to test segment splitting */ -public class TinySegmentQueryRowDeletionsTest extends AbstractQueryTester +@Ignore +abstract class TinySegmentQueryRowDeletionsTester extends SingleNodeQueryTester { @Before - public void setSegmentWriteBufferSpace() throws Throwable + public void setSegmentWriteBufferSpace() { DatabaseDescriptor.setSAISegmentWriteBufferSpace(0); } diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryRowDeletionsWithBaseModelTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryRowDeletionsWithBaseModelTest.java new file mode 100644 index 000000000000..330a4d5ad28a --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryRowDeletionsWithBaseModelTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class TinySegmentQueryRowDeletionsWithBaseModelTest extends TinySegmentQueryRowDeletionsTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::baseDataModelParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryRowDeletionsWithCompositePartitionKeyTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryRowDeletionsWithCompositePartitionKeyTest.java new file mode 100644 index 000000000000..2fa97e04eb98 --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryRowDeletionsWithCompositePartitionKeyTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class TinySegmentQueryRowDeletionsWithCompositePartitionKeyTest extends TinySegmentQueryRowDeletionsTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compositePartitionKeyParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryRowDeletionsWithCompoundKeyTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryRowDeletionsWithCompoundKeyTest.java new file mode 100644 index 000000000000..4e57a45892ec --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryRowDeletionsWithCompoundKeyTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class TinySegmentQueryRowDeletionsWithCompoundKeyTest extends TinySegmentQueryRowDeletionsTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compoundKeyParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryRowDeletionsWithCompoundKeyWithStaticsTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryRowDeletionsWithCompoundKeyWithStaticsTest.java new file mode 100644 index 000000000000..60cbad8ba82c --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryRowDeletionsWithCompoundKeyWithStaticsTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class TinySegmentQueryRowDeletionsWithCompoundKeyWithStaticsTest extends TinySegmentQueryRowDeletionsTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compoundKeyWithStaticsParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/TinySegmentQueryTimeToLiveTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryTimeToLiveTester.java similarity index 85% rename from test/unit/org/apache/cassandra/index/sai/cql/TinySegmentQueryTimeToLiveTest.java rename to test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryTimeToLiveTester.java index dfa17f7aa788..72b953e4ce7e 100644 --- a/test/unit/org/apache/cassandra/index/sai/cql/TinySegmentQueryTimeToLiveTest.java +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryTimeToLiveTester.java @@ -15,9 +15,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.cassandra.index.sai.cql; +package org.apache.cassandra.index.sai.cql.datamodels; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.apache.cassandra.config.DatabaseDescriptor; @@ -25,10 +26,11 @@ /** * Force generates segments due to a small RAM size on compaction, to test segment splitting */ -public class TinySegmentQueryTimeToLiveTest extends AbstractQueryTester +@Ignore +abstract class TinySegmentQueryTimeToLiveTester extends SingleNodeQueryTester { @Before - public void setSegmentWriteBufferSpace() throws Throwable + public void setSegmentWriteBufferSpace() { DatabaseDescriptor.setSAISegmentWriteBufferSpace(0); } diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryTimeToLiveWithBaseModelTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryTimeToLiveWithBaseModelTest.java new file mode 100644 index 000000000000..842cd73a198f --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryTimeToLiveWithBaseModelTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class TinySegmentQueryTimeToLiveWithBaseModelTest extends TinySegmentQueryTimeToLiveTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::baseDataModelParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryTimeToLiveWithCompositePartitionKeyTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryTimeToLiveWithCompositePartitionKeyTest.java new file mode 100644 index 000000000000..bad2b9fce029 --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryTimeToLiveWithCompositePartitionKeyTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class TinySegmentQueryTimeToLiveWithCompositePartitionKeyTest extends TinySegmentQueryTimeToLiveTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compositePartitionKeyParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryTimeToLiveWithCompoundKeyTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryTimeToLiveWithCompoundKeyTest.java new file mode 100644 index 000000000000..4fb8ade73108 --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryTimeToLiveWithCompoundKeyTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class TinySegmentQueryTimeToLiveWithCompoundKeyTest extends TinySegmentQueryTimeToLiveTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compoundKeyParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryTimeToLiveWithCompoundKeyWithStaticsTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryTimeToLiveWithCompoundKeyWithStaticsTest.java new file mode 100644 index 000000000000..b296ef23d6df --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryTimeToLiveWithCompoundKeyWithStaticsTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class TinySegmentQueryTimeToLiveWithCompoundKeyWithStaticsTest extends TinySegmentQueryTimeToLiveTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compoundKeyWithStaticsParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/TinySegmentQueryWriteLifecycleTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryWriteLifecycleTester.java similarity index 85% rename from test/unit/org/apache/cassandra/index/sai/cql/TinySegmentQueryWriteLifecycleTest.java rename to test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryWriteLifecycleTester.java index 778b70de8509..e25dd267908e 100644 --- a/test/unit/org/apache/cassandra/index/sai/cql/TinySegmentQueryWriteLifecycleTest.java +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryWriteLifecycleTester.java @@ -15,9 +15,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.cassandra.index.sai.cql; +package org.apache.cassandra.index.sai.cql.datamodels; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.apache.cassandra.config.DatabaseDescriptor; @@ -25,10 +26,11 @@ /** * Force generates segments due to a small RAM size on compaction, to test segment splitting */ -public class TinySegmentQueryWriteLifecycleTest extends AbstractQueryTester +@Ignore +abstract class TinySegmentQueryWriteLifecycleTester extends SingleNodeQueryTester { @Before - public void setSegmentWriteBufferSpace() throws Throwable + public void setSegmentWriteBufferSpace() { DatabaseDescriptor.setSAISegmentWriteBufferSpace(0); } diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryWriteLifecycleWithBaseModelTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryWriteLifecycleWithBaseModelTest.java new file mode 100644 index 000000000000..45ea29d046be --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryWriteLifecycleWithBaseModelTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class TinySegmentQueryWriteLifecycleWithBaseModelTest extends TinySegmentQueryWriteLifecycleTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::baseDataModelParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryWriteLifecycleWithCompositePartitionKeyTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryWriteLifecycleWithCompositePartitionKeyTest.java new file mode 100644 index 000000000000..79e5610cbf1d --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryWriteLifecycleWithCompositePartitionKeyTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class TinySegmentQueryWriteLifecycleWithCompositePartitionKeyTest extends TinySegmentQueryWriteLifecycleTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compositePartitionKeyParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryWriteLifecycleWithCompoundKeyTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryWriteLifecycleWithCompoundKeyTest.java new file mode 100644 index 000000000000..55e2b0e1b265 --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryWriteLifecycleWithCompoundKeyTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class TinySegmentQueryWriteLifecycleWithCompoundKeyTest extends TinySegmentQueryWriteLifecycleTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compoundKeyParams); + } +} diff --git a/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryWriteLifecycleWithCompoundKeyWithStaticsTest.java b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryWriteLifecycleWithCompoundKeyWithStaticsTest.java new file mode 100644 index 000000000000..1d811326e4be --- /dev/null +++ b/test/unit/org/apache/cassandra/index/sai/cql/datamodels/TinySegmentQueryWriteLifecycleWithCompoundKeyWithStaticsTest.java @@ -0,0 +1,29 @@ +/* + * Copyright DataStax, Inc. + * + * Licensed 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.index.sai.cql.datamodels; + +import java.util.List; + +import org.junit.runners.Parameterized; + +public class TinySegmentQueryWriteLifecycleWithCompoundKeyWithStaticsTest extends TinySegmentQueryWriteLifecycleTester +{ + @Parameterized.Parameters(name = "{0}") + public static List params() + { + return allIndexVersionsParams(SingleNodeQueryTester::compoundKeyWithStaticsParams); + } +}