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

Tyler Hobbs commented on CASSANDRA-6968:
----------------------------------------

Overall this looks pretty good.  A few comments:
* There are a lot of unused imports from before you made 
SchemaLoader.createKeyspace().  For the sake of conflicts, try not to change 
import order in a lot of places if you can avoid it.
* There are some System.out.printlns in LongCompactionsTest
* SchemaLoader.stopGossiper() should be removed (only CQLTester uses it, and 
that should get taken care of by CASSANDRA-7327)

I think it will be easiest to commit CASSANDRA-7327 first and then update this 
patch to use {{MigrationManager.announceNewKeyspace(ksm, false)}} to skip the 
gossiper.

Regarding {{forkmode="once"}}, I imagine we can do that along with the changes 
in this patch.  Any tests that require a clean slate should be able to take 
care of that in test setup.  Of course, some of that will probably turn out to 
be tricky.  I would be in favor of investigating that in a separate patch after 
this and CASSANDRA-7327 are committed.

> Reduce Unit Test Times Due to Schema Loading
> --------------------------------------------
>
>                 Key: CASSANDRA-6968
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6968
>             Project: Cassandra
>          Issue Type: Test
>          Components: Tests
>            Reporter: Tyler Hobbs
>            Assignee: Lyuben Todorov
>            Priority: Minor
>             Fix For: 2.1.1
>
>         Attachments: trunk-6968-speedup-unittests.patch
>
>
> Unit tests which extend SchemaLoader take about 6s longer to run than the 
> others, on average.  We could greatly reduce the time it takes to run the 
> tests by improving this.
> None of the tests require everything that SchemaLoader does.  We should 
> change SchemaLoader into a set of test utilities that are run as needed in 
> {{\@BeforeClass}} and {{\@AfterClass}} methods.  Additionally, instead of 
> running a full cleanup, most tests could simply use a keyspace or column 
> family with a unique name (class/method name or perhaps class/method name + 
> timestamp).



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to