Search in sources :

Example 1 with DefaultReactiveSessionFactory

use of org.springframework.data.cassandra.core.cql.session.DefaultReactiveSessionFactory in project spring-data-cassandra by spring-projects.

the class ReactiveCqlTemplateIntegrationTests method before.

@BeforeEach
void before() {
    reactiveSession = new DefaultBridgedReactiveSession(getSession());
    if (initialized.compareAndSet(false, true)) {
        getSession().execute("CREATE TABLE IF NOT EXISTS user (id text PRIMARY KEY, username text);");
    }
    getSession().execute("TRUNCATE user;");
    getSession().execute("INSERT INTO user (id, username) VALUES ('WHITE', 'Walter');");
    template = new ReactiveCqlTemplate(new DefaultReactiveSessionFactory(reactiveSession));
    cassandraVersion = CassandraVersion.get(getSession());
}
Also used : DefaultReactiveSessionFactory(org.springframework.data.cassandra.core.cql.session.DefaultReactiveSessionFactory) DefaultBridgedReactiveSession(org.springframework.data.cassandra.core.cql.session.DefaultBridgedReactiveSession) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with DefaultReactiveSessionFactory

use of org.springframework.data.cassandra.core.cql.session.DefaultReactiveSessionFactory in project spring-data-cassandra by spring-projects.

the class ReactiveCqlTemplateUnitTests method setup.

@BeforeEach
void setup() throws Exception {
    this.sessionFactory = new DefaultReactiveSessionFactory(session);
    this.template = new ReactiveCqlTemplate(sessionFactory);
}
Also used : DefaultReactiveSessionFactory(org.springframework.data.cassandra.core.cql.session.DefaultReactiveSessionFactory) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

BeforeEach (org.junit.jupiter.api.BeforeEach)2 DefaultReactiveSessionFactory (org.springframework.data.cassandra.core.cql.session.DefaultReactiveSessionFactory)2 DefaultBridgedReactiveSession (org.springframework.data.cassandra.core.cql.session.DefaultBridgedReactiveSession)1