[ 
https://issues.apache.org/jira/browse/CASSANDRA-17122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17440431#comment-17440431
 ] 

Andres de la Peña commented on CASSANDRA-17122:
-----------------------------------------------

This PR adds utilities for MVs to {{CQLTester}} and modifies the existing MV 
tests to use them, getting rid of some 600 lines while reducing the risk of MV 
name collisions:
||PR||CI||
|[trunk|https://github.com/apache/cassandra/pull/1306]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1127/workflows/a104895e-8430-4fd7-a613-ea9012702bfd]
 
[j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/1127/workflows/be5ecddb-a987-4536-8803-6f46b2a1b350]|

It's based on a previous patch by [~jasonstack]. CI includes 100 repeated runs 
of all {{{}View*Test{}}}.

CC [~bereng]

> Add utilities for materialized views to CQLTester
> -------------------------------------------------
>
>                 Key: CASSANDRA-17122
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17122
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Andres de la Peña
>            Assignee: Andres de la Peña
>            Priority: Normal
>
> CASSANDRA-17070 added automatic generation of MV names to all 
> {{ViewComplex*Test}} based on an incremented {{AtomicInteger}} to prevent 
> conflicts when the cleanup methods leave a dirty environment. However, we 
> still have ten MV tests that could benefit from this kind of name generation 
> to avoid potential name conflicts.
> Also, the tests for materialized views have multiple code duplications. There 
> are three identical implementations of the {{createView(String, String)}} 
> method, eight lists of created views and six almost identical 
> parameterizations of {{{}ProtocolVersion{}}}.
> I think we should add methods to create and drop MVs to {{{}CQLTester{}}}, 
> analogous to the methods that it already has for keyspaces, tables, indexes, 
> functions and aggregates. That way we would prevent potential conflicts with 
> MV names and reduce code duplication. These methods would also be useful for 
> any new tests using MVs that we add in the future, such as for example the 
> ones that we would probably need for any future guardrail on MVs.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to