updated tests
This commit is contained in:
parent
90c562b6d5
commit
cd27bda1c5
|
@ -31,25 +31,25 @@ public class BaseDbTest {
|
|||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
// if (CUSTOM_DB)
|
||||
// setCustomConfig();
|
||||
if (CUSTOM_DB)
|
||||
setCustomConfig();
|
||||
store = createStore();
|
||||
}
|
||||
|
||||
// // set true to override the configuration from ic-client
|
||||
// protected static boolean CUSTOM_DB = true;
|
||||
// set true to override the configuration from ic-client
|
||||
protected static boolean CUSTOM_DB = false;
|
||||
|
||||
// // used when the custom ic-client is not available
|
||||
// protected static void setCustomConfig() throws Exception {
|
||||
// setCustomConfig(HOST, DATACENTER, KEYSPACE);
|
||||
// }
|
||||
// used when the custom ic-client is not available
|
||||
protected static void setCustomConfig() throws Exception {
|
||||
setCustomConfig(HOST, DATACENTER, KEYSPACE);
|
||||
}
|
||||
|
||||
// protected static void setCustomConfig(String host, String datacenterName, String keysSpace) throws Exception {
|
||||
// // host = HOST;
|
||||
// // datacenterName = DATACENTER;
|
||||
// // keyspace = KEYSPACE;
|
||||
// CassandraClusterConnection.setCustomConfig(host, datacenterName, keysSpace);
|
||||
// }
|
||||
protected static void setCustomConfig(String host, String datacenterName, String keysSpace) throws Exception {
|
||||
// host = HOST;
|
||||
// datacenterName = DATACENTER;
|
||||
// keyspace = KEYSPACE;
|
||||
CassandraClusterConnection.setCustomConfig(host, datacenterName, keysSpace);
|
||||
}
|
||||
|
||||
public static DBCassandraAstyanaxImpl createStore() throws Exception {
|
||||
return new DBCassandraAstyanaxImpl(INFRASTRUCTURE);
|
||||
|
|
|
@ -17,11 +17,11 @@ import com.datastax.oss.driver.api.core.cql.SimpleStatement;
|
|||
|
||||
public class DbTest extends BaseDbTest {
|
||||
|
||||
// @Test
|
||||
// public void updateSchema() throws Exception {
|
||||
// CassandraClusterConnection conn = getConnection();
|
||||
// conn.SetUpKeySpaces(false, true);
|
||||
// }
|
||||
@Test
|
||||
public void updateSchema() throws Exception {
|
||||
CassandraClusterConnection conn = getConnection();
|
||||
conn.SetUpKeySpaces(false, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void cresteStore() throws Exception {
|
||||
|
|
|
@ -25,8 +25,8 @@ import com.datastax.oss.driver.api.core.CqlSession;
|
|||
|
||||
public class MessagesTest extends BaseDbTest{
|
||||
|
||||
private CassandraClusterConnection connection;
|
||||
private DBCassandraAstyanaxImpl store;
|
||||
// private CassandraClusterConnection connection;
|
||||
// private DBCassandraAstyanaxImpl store;
|
||||
private String testFrom;
|
||||
private String recipient;
|
||||
private String recipient2;
|
||||
|
@ -43,6 +43,7 @@ public class MessagesTest extends BaseDbTest{
|
|||
subject = "test subject";
|
||||
body = "test body";
|
||||
recipients = Arrays.asList(recipient, recipient2);
|
||||
store = getStore();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -640,7 +641,7 @@ public class MessagesTest extends BaseDbTest{
|
|||
CqlSession session = store.getSession();
|
||||
Date timestamp = null;
|
||||
// Integer limit = 100000;
|
||||
Integer limit = 100;
|
||||
Integer limit = 10;
|
||||
|
||||
List<String> destinatari = Arrays.asList("alfredo.oliviero", "massimiliano.assante", "andrea.rossi");
|
||||
List<Notification> notifications = store.getAllNotifications(timestamp, limit, session);
|
||||
|
|
Loading…
Reference in New Issue