I have the following:
CompletableFuture<> cf = CompletableFuture.allOf(cqlSession.executeAsync(statement)
.thenApply(AsyncResultSet::wasApplied)
.toCompletableFuture());
cf.thenApply(s -> Thread.Sleep(60000); //try-catch omitted)
.get(10, TimeUnit.SECONDS);
Based on datastax' documentation from here, I would've assumed that a Detected a synchronous API...
exception would be thrown, but a Cassandra timeout after PT2S
is thrown instead. Any idea why this is happening? There's no issue on the writing side as I'm using a Docker container with "ideal" resources (if I remove the Thread.sleep() everything works fine).
While everything that is happening makes sense, it bothers me that a different exception is thrown than the one from the original documentation.
The test is made on a local environment - 1 node, multiple threads.