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

Jacek Lewandowski commented on CASSANDRA-17427:
-----------------------------------------------

[PR (trunk)|https://github.com/apache/cassandra/pull/1488]

As an example, I've compared times of running a random set of tests ({{time ant 
testclasslist}}):

{noformat}
org/apache/cassandra/cql3/ViewFilteringComplexPKTest.java
org/apache/cassandra/cql3/PstmtPersistenceTest.java
org/apache/cassandra/cql3/ViewFilteringClustering1Test.java
org/apache/cassandra/cql3/MemtableSizeTest.java
org/apache/cassandra/cql3/GcCompactionTest.java
org/apache/cassandra/cql3/ViewRangesTest.java
org/apache/cassandra/cql3/ViewTimesTest.java
org/apache/cassandra/cql3/DurationTest.java
org/apache/cassandra/cql3/ViewTest.java
org/apache/cassandra/cql3/ViewComplexTest.java
{noformat}

It was ~ 3'55" vs 3'15" (40 seconds faster)

I also tried for a single test ({{ViewTest}}), it was 50" vs 35" (15 seconds 
faster)

For a single run, we can safe around 12 seconds by avoiding {{checkstyle}}, 
{{rat-check}} and {{eclipse-warnings}} - it is enough for them to be executed 
once for the whole build (when we generate artifacts).

Other changes include: 
- using {{rm -r}} instead of iterating over directories and individual files in 
Java when deleting stuff (we delete many files before each test) - this is 
enabled only in unit tests by a system property
- setting grace period for driver shutdown to 0
- avoiding use of open ssl in unit tests

There is also a small change in {{workspace.xml}} for IntelliJ which increases 
max meta space memory from 384M to 512M as it frequently happens for jvm dtests 
to fail because of insufficient amount of that memory


> Improve unit tests performance
> ------------------------------
>
>                 Key: CASSANDRA-17427
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17427
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Test/unit
>            Reporter: Jacek Lewandowski
>            Assignee: Jacek Lewandowski
>            Priority: Normal
>
> There a couple of small improvements to run unit tests a bit faster



--
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