You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Claude Warren (Jira)" <ji...@apache.org> on 2022/07/06 05:53:00 UTC

[jira] [Commented] (CASSANDRA-17127) Remove use of deprecated java.util.concurrent in tests

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

Claude Warren commented on CASSANDRA-17127:
-------------------------------------------

In looking at the code it seems to me that it is valid to use the mentioned classes as they are not deprecated but rather restricted by our checkstyle.  I understand their not being "legal" for main code but for test code I think they are valid.  So rather than remove the use of the classes I propose we modify the checkstyle config for the test code to allow these classes to be used.  I think there are 2 ways to do this.

# find and add the checkstyle annotation  to turn off checkstyle checking in the code blocks the use the classes.  I think this turns off all of the checkstyle checking for the code blocks and would block more checks than we want.
# add and XSLT transform that modifies the main checkstyle.xml to create a checkstyle_test.xml that is then used in testing.  The XSLT would remove the restrictions on the noted classes.  The result with this solution is that changes to checkstyle.xml will still flow down to the test code with specific changes required by the testing classes.

I would select option 2.  Are there any objections to following this path?

> Remove use of deprecated java.util.concurrent in tests
> ------------------------------------------------------
>
>                 Key: CASSANDRA-17127
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17127
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Test/unit
>            Reporter: Brandon Williams
>            Priority: Normal
>
> {noformat}
>       1  Illegal import - java.util.concurrent.ArrayBlockingQueue. [IllegalImport]
>      11  Illegal import - java.util.concurrent.CompletableFuture. [IllegalImport]
>      39  Illegal import - java.util.concurrent.CountDownLatch. [IllegalImport]
>      48  Illegal import - java.util.concurrent.Executors. [IllegalImport]
>       3  Illegal import - java.util.concurrent.LinkedBlockingQueue. [IllegalImport]
>       5  Illegal import - java.util.concurrent.Semaphore. [IllegalImport]
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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