Java源码示例:com.datastax.driver.core.exceptions.OperationTimedOutException
示例1@Test
public void testShouldReturnClientTimeout() throws Exception {
server.prime(when(query));
thrown.expect(OperationTimedOutException.class);
query(new SimpleStatement(query).setReadTimeoutMillis(1000));
}
@Test
public void testShouldReturnClientTimeoutWhenUsingNoResult() throws Exception {
server.prime(when(query).then(noResult()));
thrown.expect(OperationTimedOutException.class);
query(new SimpleStatement(query).setReadTimeoutMillis(1000));
}