cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua McKenzie (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-10555) ReadCommandTest should truncate between test cases
Date Tue, 20 Oct 2015 15:34:27 GMT

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

Joshua McKenzie commented on CASSANDRA-10555:
---------------------------------------------

Committed as {{881e2da0a4c37f54fbd52ed66f080e33af02b978}}

> ReadCommandTest should truncate between test cases 
> ---------------------------------------------------
>
>                 Key: CASSANDRA-10555
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10555
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tests
>            Reporter: Jeff Jirsa
>            Assignee: Jeff Jirsa
>            Priority: Minor
>             Fix For: 3.1
>
>
> 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):
FAILED
>     [junit] expected:<2> but was:<1>
>     [junit] junit.framework.AssertionFailedError: expected:<2> but was:<1>
>     [junit] 	at org.apache.cassandra.db.ReadCommandTest.testSinglePartitionNamesAbort(ReadCommandTest.java:140)
>     [junit] 
>     [junit] 
>     [junit] Testcase: testSinglePartitionSliceAbort(org.apache.cassandra.db.ReadCommandTest):
FAILED
>     [junit] expected:<2> but was:<3>
>     [junit] junit.framework.AssertionFailedError: expected:<2> but was:<3>
>     [junit] 	at org.apache.cassandra.db.ReadCommandTest.testSinglePartitionSliceAbort(ReadCommandTest.java:111)
> {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
(v6.3.4#6332)

Mime
View raw message