I have one unit test in which I am writing and reading from cassandra multiple times.
future = function(Cassandra update with value x) - async //write and read updated value
value = future.get(); //reading
print value;
assert value == x;
//doing the above operation multiple times with different values of x;
Running the same code multiple times is showing different results i.e printing different result for 'value' attribute.
I am using cassandra on local host with
replication = {
'class': 'SimpleStrategy',
'replication_factor': '1'
};
It's worth noting that I am writing and reading at a same row in the table (in all read and write, primary key is same).
And though I am modifying the same object multiple times, but they are supposed to run sequentially as I am running blocking function future.get()
after every update statement.
I am using Cassandra 2.0.14
with datastax
driver and jdk 1.8
.
Any ideas why I must be facing such behaviour?