cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Blake Eggleston (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-10266) Introduce direct unit test coverage for Rows
Date Mon, 14 Sep 2015 16:51:45 GMT

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

Blake Eggleston commented on CASSANDRA-10266:
---------------------------------------------

I think adding random testing is a great idea. In fact, I wrote a randomized failure simulator
test for epaxos ([here|https://github.com/bdeggleston/cassandra/blob/CASSANDRA-6246-trunk/test/long/org/apache/cassandra/service/epaxos/EpaxosFuzzer.java#L48-48])
that was very useful.

That said, I'm not sure that randomized testing of lower level classes like Rows is the best
way to go. First, checking the result of random inputs is basically going to require rewriting
each of the methods in the test class to verify their output. Second, although these methods
are used all over the place, they're pretty narrow in scope, and not too difficult to exhaustively
unit test.

I think randomized testing would be most valuable when testing how multiple classes work together,
ideally simulating the interaction between multiple nodes. Randomized integration tests basically.
For instance, testing DataResolver with random (and repeatable) sequences of node query combinations,
messaging failures, memtable flushes, and compactions would have revealed the bug found here,
and it probably would have exposed bugs that existed in other classes as well. The code used
to verify the results would be simpler as well.

> Introduce direct unit test coverage for Rows
> --------------------------------------------
>
>                 Key: CASSANDRA-10266
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10266
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Benedict
>            Assignee: Blake Eggleston
>             Fix For: 3.0.0 rc1
>
>
> As with much of the codebase, we have no direct unit test coverage for {{Rows}}, and
we should remedy this given how central it is to behaviour.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message