Re: CQL unit tests vs dtests

2014-05-22 Thread Ryan McGuire
We actually have some jython tests for a few test suites we wanted to use the java driver with: https://github.com/riptano/cassandra-dtest-jython On Thu, May 22, 2014 at 2:36 PM, Jake Luciani wrote: > Jython! :D > > > On Thu, May 22, 2014 at 12:09 PM, Benedict Elliott Smith < > belliottsm...@da

Re: CQL unit tests vs dtests

2014-05-22 Thread Jake Luciani
Jython! :D On Thu, May 22, 2014 at 12:09 PM, Benedict Elliott Smith < belliottsm...@datastax.com> wrote: > I would for defining the cql tests in a way that permits them being run as > both dtests and unit tests. But since we're on python for dtests that could > be troublesome. > > > On 22 May 20

Re: CQL unit tests vs dtests

2014-05-22 Thread Benedict Elliott Smith
I would for defining the cql tests in a way that permits them being run as both dtests and unit tests. But since we're on python for dtests that could be troublesome. On 22 May 2014 17:03, Jeremiah D Jordan wrote: > The only thing I worry about here is that the unit tests don't come into > the

Re: CQL unit tests vs dtests

2014-05-22 Thread Jeremiah D Jordan
The only thing I worry about here is that the unit tests don't come into the system the same way user queries will. So we still need the system level dtests. So I don't think all CQL tests should be unit tests, but I am all for there being unit level CQL tests. On May 22, 2014, at 10:58 AM, S

Re: CQL unit tests vs dtests

2014-05-22 Thread Sylvain Lebresne
On Wed, May 21, 2014 at 10:46 PM, Jonathan Ellis wrote: > I do think that CQL tests in general make more sense as unit tests, > but I'm not so anal that I'm going to insist on rewriting existing > ones. But in theory, if I had an infinite army of interns, sure. I'd > have one of them do that. :)

Re: CQL unit tests vs dtests

2014-05-21 Thread Jonathan Ellis
On Wed, May 21, 2014 at 4:06 AM, Sylvain Lebresne wrote: > Having tests that are > intrinsically > the same kind of tests in two places bugs me a bit more however. I do think that CQL tests in general make more sense as unit tests, but I'm not so anal that I'm going to insist on rewriting existi

Re: CQL unit tests vs dtests

2014-05-21 Thread Ryan Svihla
The standard reasoning for unit tests is specificity of errors. Well written tests suites tell you where you screwed up exactly just by the success and failure pattern, often cutting down the need for a debugger. System tests standard rational is validating these units are wired up correctly. Henc

Re: CQL unit tests vs dtests

2014-05-21 Thread Sylvain Lebresne
Just to be clear, I'm not strongly opposed to having CQL tests in the unit tests suite per-se (I happen to find dtests easier to work with, probably because I don't use debuggers, but I'm good with saying that this just mean I'm crazy and shouldn't be taken into account). Having tests that are intr

Re: CQL unit tests vs dtests

2014-05-20 Thread Brandon Williams
On Tue, May 20, 2014 at 6:42 PM, Jonathan Ellis wrote: > So my preferred approach is, unit test when possible without writing a lot > of scaffolding and mock superstructure. Mocking is your code telling you to > write a system test. This.

Re: CQL unit tests vs dtests

2014-05-20 Thread Benedict Elliott Smith
+1 unit tests On 21 May 2014 02:36, "Jake Luciani" wrote: > I think having cql unit tests is certainly a good idea. It doesn't replace > dtests but makes it easier to have better coverage locally. > > > On Tue, May 20, 2014 at 7:10 PM, Tyler Hobbs wrote: > > > Sylvain and I have been having a d

Re: CQL unit tests vs dtests

2014-05-20 Thread Jake Luciani
I think having cql unit tests is certainly a good idea. It doesn't replace dtests but makes it easier to have better coverage locally. On Tue, May 20, 2014 at 7:10 PM, Tyler Hobbs wrote: > Sylvain and I have been having a discussion about testing CQL in unit tests > vs dtests. I'd like to hea

Re: CQL unit tests vs dtests

2014-05-20 Thread Jonathan Ellis
Given a unit and a system test that cover the same code, the unit test is 10x more useful when something breaks. It's difficult to run dtests locally at all, let alone attach your debugger to the right instance at the right time to troubleshoot deeper. So my preferred approach is, unit test when p

CQL unit tests vs dtests

2014-05-20 Thread Tyler Hobbs
Sylvain and I have been having a discussion about testing CQL in unit tests vs dtests. I'd like to hear if there are any other opinions on the topic. We currently only test CQL queries through dtests. I'd like to start adding unit tests that exercise CQL where it makes sense. To me, dtests make