Java 类com.datastax.driver.core.exceptions.OperationTimedOutException 实例源码
项目:simulacron
文件:ErrorResultIntegrationTest.java
@Test
public void testShouldReturnClientTimeout() throws Exception {
server.prime(when(query));
thrown.expect(OperationTimedOutException.class);
query(new SimpleStatement(query).setReadTimeoutMillis(1000));
}
项目:bigDataRocks
文件:PersonCassandraDaoTest.java
@AfterClass
public static void stopCassandra() {
//Sometimes cleaning request to EmbeddedCassandra timeouts but it is not a big deal not to clean embeddedCassandra
// because keyspace is dropped and recreated in the initialization of this test. It is better not to break the build
// on slow machines
try {
EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
} catch (OperationTimedOutException e) {
e.printStackTrace();
}
}
项目:simulacron
文件:ErrorResultIntegrationTest.java
@Test
public void testShouldReturnClientTimeoutWhenUsingNoResult() throws Exception {
server.prime(when(query).then(noResult()));
thrown.expect(OperationTimedOutException.class);
query(new SimpleStatement(query).setReadTimeoutMillis(1000));
}