From 1db823af3cf4694fd1678b4e97946d8d560743d7 Mon Sep 17 00:00:00 2001 From: Kevin Risden <risdenk@avalonconsult.com> Date: Thu, 29 Sep 2016 08:01:03 -0500 Subject: [PATCH] [cassandra] Increase Cassandra test timeout and add logging --- cassandra/pom.xml | 6 ++++++ .../test/java/com/yahoo/ycsb/db/CassandraCQLClientTest.java | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/cassandra/pom.xml b/cassandra/pom.xml index 15a145ea..2f572e6f 100644 --- a/cassandra/pom.xml +++ b/cassandra/pom.xml @@ -56,6 +56,12 @@ LICENSE file. <classifier>shaded</classifier> <scope>test</scope> </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <version>1.7.21</version> + <scope>test</scope> + </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> diff --git a/cassandra/src/test/java/com/yahoo/ycsb/db/CassandraCQLClientTest.java b/cassandra/src/test/java/com/yahoo/ycsb/db/CassandraCQLClientTest.java index 60b7e2f3..870d5a7d 100644 --- a/cassandra/src/test/java/com/yahoo/ycsb/db/CassandraCQLClientTest.java +++ b/cassandra/src/test/java/com/yahoo/ycsb/db/CassandraCQLClientTest.java @@ -54,6 +54,9 @@ import java.util.Set; * Integration tests for the Cassandra client */ public class CassandraCQLClientTest { + // Change the default Cassandra timeout from 10s to 120s for slow CI machines + private final static long timeout = 120000L; + private final static String TABLE = "usertable"; private final static String HOST = "localhost"; private final static int PORT = 9142; @@ -63,7 +66,8 @@ public class CassandraCQLClientTest { private Session session; @ClassRule - public static CassandraCQLUnit cassandraUnit = new CassandraCQLUnit(new ClassPathCQLDataSet("ycsb.cql", "ycsb")); + public static CassandraCQLUnit cassandraUnit = new CassandraCQLUnit( + new ClassPathCQLDataSet("ycsb.cql", "ycsb"), null, timeout); @Before public void setUp() throws Exception { -- GitLab