Skip to content

Commit

Permalink
closes #219
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Robbins | hybris committed Jan 10, 2016
1 parent 7c407ce commit f90af3f
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 683 deletions.
16 changes: 11 additions & 5 deletions FlashCards_Config/src/main/resources/default.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# DataSource properties
hibernate.connection.provider_class=com.zaxxer.hikari.hibernate.HikariConnectionProvider
hibernate.hikari.dataSourceClassName=com.mysql.jdbc.jdbc2.optional.MysqlDataSource
hibernate.hikari.dataSource.url=jdbc:mysql://localhost/flashcardapp_db?useConfigs=maxPerformance&rewriteBatchedStatements=true
Expand All @@ -8,24 +9,29 @@ hibernate.hikari.dataSource.prepStmtCacheSize=250
hibernate.hikari.dataSource.prepStmtCacheSqlLimit=2048
hibernate.hikari.maximumPoolSize=10

# Hibernate / JPA properties
jpaVendorAdapter.showSql=true
jpaVendorAdapter.database=MYSQL
jpaVendorAdapter.databasePlatform=org.hibernate.dialect.MySQLDialect

hibernate.hbm2ddl.auto=create

hibernate.show_sql=false
hibernate.format_sql=false

hibernate.jdbc.batch_size=1000
hibernate.order_inserts=true
org.hibernate.flushMode=COMMIT
use_sql_comments=false

hibernate.show_sql=false
hibernate.format_sql=false

# client properties
server.address=http://localhost:8080/api/
server.loginname=apiuser
server.password=apiuserpassword

# cassandra properties
cassandra.contactpoints=localhost
cassandra.native_transport_port=9042
cassandra.keyspace=flashcardsapp

# Akka properties
jdbc.batchsize=1000
akka.workerCount=20
11 changes: 6 additions & 5 deletions FlashCards_Repository/FlashCards_Repository_Cassandra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@
<artifactId>hamcrest-all</artifactId>
</dependency>

<dependency>
<groupId>org.cassandraunit</groupId>
<artifactId>cassandra-unit-spring</artifactId>
</dependency>

<!-- logging -->
<dependency>
<groupId>org.slf4j</groupId>
Expand All @@ -95,5 +90,11 @@
</dependencies>
<build>
<finalName>FlashCards_Repository_Cassandra</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cassandra-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd" >

<context:property-placeholder location="classpath:cassandra.properties" />
<context:property-placeholder location="classpath*:/default.properties,classpath*:/override.properties" order="1" ignore-unresolvable="true" />

<import resource="classpath:META-INF/applicationContext-repository-cassandraNamespace.xml" />

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,23 @@

import javax.inject.Inject;

import org.cassandraunit.spring.CassandraDataSet;

import org.cassandraunit.spring.EmbeddedCassandra;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.robbins.flashcards.cassandra.repository.executionlisteners.CassandraUnitDependencyInjectionTestExecutionListener;
import org.robbins.flashcards.cassandra.repository.util.IntegrationTestUtils;
import org.robbins.tests.IntegrationTest;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;
import org.springframework.test.context.support.DirtiesContextTestExecutionListener;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:META-INF/test-applicationContext-repository-cassandra.xml")
@TestExecutionListeners({CassandraUnitDependencyInjectionTestExecutionListener.class,
DependencyInjectionTestExecutionListener.class})
@EmbeddedCassandra(configuration = "flashcards-cassandra.yaml")
@CassandraDataSet(value = {"cql/FlashCard.cql", "cql/Tag.cql", "cql/User.cql", "cql/Tag_FlashCard.cql"}, keyspace = "flashcardsapp")
@TestExecutionListeners({ DependencyInjectionTestExecutionListener.class,
DirtiesContextTestExecutionListener.class })
@Category(IntegrationTest.class)
public abstract class AbstractCassandraIntegrationTest {
public abstract class AbstractCassandraIntegrationTest
{

@Inject
public IntegrationTestUtils testUtils;
Expand Down

This file was deleted.

Loading

0 comments on commit f90af3f

Please sign in to comment.