cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefania (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-10555) ReadCommandTest should truncate between test cases
Date Tue, 20 Oct 2015 06:35:27 GMT


Stefania commented on CASSANDRA-10555:

The problem can only be reproduced if {{testSinglePartitionNamesAbort}} runs before {{testSinglePartitionSliceAbort}}
and it's because of the typo "cdd" instead of "dd". So the typo must be fixed. We could write
the data only once since it is identical but truncating is preferred in case later on we want
to modify the test methods.

+1 once the test is confirmed to pass on CI as well:

Thank you for fixing this.

> ReadCommandTest should truncate between test cases 
> ---------------------------------------------------
>                 Key: CASSANDRA-10555
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tests
>            Reporter: Jeff Jirsa
>            Assignee: Jeff Jirsa
>            Priority: Minor
> ReadCommandTest writes to the same CF in multiple unit tests, and then counts the results
in a partition. This can lead to tests failing in some circumstances:
> {noformat}
>     [junit] Testcase: testSinglePartitionNamesAbort(org.apache.cassandra.db.ReadCommandTest):
>     [junit] expected:<2> but was:<1>
>     [junit] junit.framework.AssertionFailedError: expected:<2> but was:<1>
>     [junit] 	at org.apache.cassandra.db.ReadCommandTest.testSinglePartitionNamesAbort(
>     [junit] 
>     [junit] 
>     [junit] Testcase: testSinglePartitionSliceAbort(org.apache.cassandra.db.ReadCommandTest):
>     [junit] expected:<2> but was:<3>
>     [junit] junit.framework.AssertionFailedError: expected:<2> but was:<3>
>     [junit] 	at org.apache.cassandra.db.ReadCommandTest.testSinglePartitionSliceAbort(
> {noformat}
> This can be fixed trivially by truncating the CF at the beginning of {{testSinglePartitionSliceAbort}}
and {{testSinglePartitionNamesAbort}} 
> Also, once the truncate is in place, a potential typo is exposed in {{testSinglePartitionNamesAbort}},
where the partition is written with clustering column {{cc}} and {{cdd}}, but the read command
reads {{cc}} and {{dd}} 

This message was sent by Atlassian JIRA

View raw message