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

Jason Man edited comment on IGNITE-6853 at 1/16/18 8:15 AM:
------------------------------------------------------------

This is less than ideal though.  I am trying this and the number of lines of 
the test class quickly grows from 1xx lines to 800+ lines of boiler plate code. 
 Even at this point I'm still not done mocking the objects manually.

Then eventually I get stuck at mocking this class 
com.datastax.driver.core.ColumnDefinitions because it lacks a public 
constructor so I couldn't call super() when I try to extend it.

See attachment of the work so far:  [^CassandraSessionImplTest.java]

I think there are good reasons Mockito is popular for testing and this is the 
use case where it is very powerful at helping write unit tests.  Perhaps we 
could really consider adopting it or some other mocking framework if there is a 
preference for something else?


was (Author: [email protected]):
This is less than ideal though.  I am trying this and the number of lines of 
the test class quickly grows from 1xx lines to 800+ lines of boiler plate code.

Then eventually I get stuck at mocking this class 
com.datastax.driver.core.ColumnDefinitions because it lacks a public 
constructor so I couldn't call super() when I try to extend it.

See attachment of the work so far:  [^CassandraSessionImplTest.java]

 

> Cassandra cache store does not clean prepared statements cache when remove 
> old cassandra session
> ------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-6853
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6853
>             Project: Ignite
>          Issue Type: Bug
>          Components: cassandra
>    Affects Versions: 2.3
>            Reporter: Mikhail Cherkasov
>            Assignee: Jason Man
>            Priority: Major
>              Labels: important
>             Fix For: 2.4
>
>         Attachments: CassandraSessionImplTest.java
>
>
> Cassandra cache store does not clean prepared statements cache when remove 
> old cassandra session which can lead to:
>  Prepared
> statement cluster error detected, refreshing Cassandra session
> com.datastax.driver.core.exceptions.InvalidQueryException: Tried to execute
> unknown prepared query : 0xcad5832309a512feeb602eec67408130. You may have
> used a PreparedStatement that was created with another Cluster instance.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to