Details
-
Improvement
-
Status: Resolved
-
Normal
-
Resolution: Fixed
Description
Currently, many unit tests rely on CQLTester.createIndex to create indexes. The index name should be specified by the test itself, for example:
createIndex("CREATE CUSTOM INDEX myindex ON %s(c) USING 'org.apache.cassandra.index.internal.CustomCassandraIndex'");
Two different tests using the same index name can produce racy Index myindex already exists errors due to the asynchronicity of CQLTester.afterTest cleanup methods.
It would be nice to modify CQLTester.createIndex to make it generate its own index names, as it is done by CQLTester.createTable:
createIndex("CREATE CUSTOM INDEX %s ON %s(c) USING 'org.apache.cassandra.index.internal.CustomCassandraIndex'");
Attachments
Issue Links
- relates to
-
CASSANDRA-12834 testall failure in org.apache.cassandra.index.internal.CassandraIndexTest.indexOnFirstClusteringColumn
- Resolved