Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Robbins | hybris committed Jan 1, 2016
1 parent 885a1b1 commit c1d6303
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
import junitparams.JUnitParamsRunner;
import junitparams.Parameters;

@Ignore
//@Ignore
@ContextConfiguration(locations = {"classpath*:META-INF/applicatonContext-loadtester.xml"})
@RunWith(JUnitParamsRunner.class)
public class LoadTesterIT {

private static final Logger LOGGER = LoggerFactory.getLogger(LoadTesterIT.class);

private TestContextManager testContextManager;
private final Integer totalLoadCount = 5000000;
private final Integer batchSize = 10000;
// private final Integer totalLoadCount = 10;
// private final Integer batchSize = 10;
// private final Integer totalLoadCount = 5000000;
// private final Integer batchSize = 10000;
private final Integer totalLoadCount = 10;
private final Integer batchSize = 10;
private final String endPointName = "tagClient";
private StopWatch stopWatch;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private GenericRestCrudFacade getClient(final Class<? extends AbstractAuditableD
}

private void completeLoadTest(final String endPointName) {
LoadTestResult loadTestResult = new LoadTestResult(this.completedTestCount, endPointName,
final LoadTestResult loadTestResult = new LoadTestResult(this.completedTestCount, endPointName,
this.successCount, this.failureCount, this.totalDuration);
LOGGER.debug("LoadTestResult: {}", loadTestResult);
parent.tell(loadTestResult, self());
Expand Down
4 changes: 0 additions & 4 deletions FlashCards_Repository/FlashCards_Repository_Cassandra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-cassandra</artifactId>
</dependency>
<!--<dependency>-->
<!--<groupId>org.springframework.data</groupId>-->
<!--<artifactId>spring-data-commons-core</artifactId>-->
<!--</dependency>-->

<dependency>
<groupId>org.apache.commons</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@

<context:property-placeholder location="classpath:cassandra.properties" />

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

</beans>
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ create table flashcard (
PRIMARY KEY (id));

insert into flashcard (id, question, answer, tags)
values (1, 'question1', 'answer1', { eaa488a0-b0d8-11e4-af90-12e3f512a338 : 'tag1'});
values (1, 'question1', 'answer1', { 1 : 'tag1'});
insert into flashcard (id, question, answer, tags)
values (2, 'question2', 'answer2', { eaa48bd4-b0d8-11e4-af90-12e3f512a338 : 'tag2'});
values (2, 'question2', 'answer2', { 1 : 'tag2'});

create table tag (
id bigint,
Expand Down Expand Up @@ -50,4 +50,4 @@ create table user (
modifieduserid bigint,
PRIMARY KEY (id));
create index user_open_id on user (openid);
insert into user (id, country, createddate, email, firstname, fullname, language, lastlogindate, lastname, nickname, openid, updateddate, createduserid, modifieduserid) VALUES (9caa6c8e-b720-11e4-a71e-12e3f512a338,NULL,'2012-08-18 00:00:00','','apiuser',NULL,NULL,'2012-08-18 00:00:00','apiuser',NULL,'apiuser','2012-08-18 00:00:00',9caa6c8e-b720-11e4-a71e-12e3f512a338,NULL);
insert into user (id, country, createddate, email, firstname, fullname, language, lastlogindate, lastname, nickname, openid, updateddate, createduserid, modifieduserid) VALUES (1,NULL,'2012-08-18 00:00:00','','apiuser',NULL,NULL,'2012-08-18 00:00:00','apiuser',NULL,'apiuser','2012-08-18 00:00:00',1,NULL);
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,21 @@ public BatchLoadingReceiptDto save(final List<D> dtos) throws FlashcardsExceptio
// LOGGER.trace(receipt.toString());
// return converter.getDto(receipt);
// }

private BatchLoadingReceipt createBatchLoadingReceipt(final String type) {
BatchLoadingReceipt receipt = new BatchLoadingReceipt();
receipt.setType(type);
receipt.setStartTime(new Date());
AuditingUtil.configureCreatedByAndTime(receipt, getAuditingUserId());
return receiptRepository.save(receipt);
}

private BatchLoadingReceipt completeBatchLoadingReceipt(final int successCount, final int failureCount, final BatchLoadingReceipt receipt) {
receipt.setSuccessCount(successCount);
receipt.setFailureCount(failureCount);
receipt.setEndTime(new Date());
return receiptRepository.save(receipt);
}
//
// private BatchLoadingReceipt createBatchLoadingReceipt(final String type) {
// BatchLoadingReceipt receipt = new BatchLoadingReceipt();
// receipt.setType(type);
// receipt.setStartTime(new Date());
// AuditingUtil.configureCreatedByAndTime(receipt, getAuditingUserId());
// return receiptRepository.save(receipt);
// }
//
// private BatchLoadingReceipt completeBatchLoadingReceipt(final int successCount, final int failureCount, final BatchLoadingReceipt receipt) {
// receipt.setSuccessCount(successCount);
// receipt.setFailureCount(failureCount);
// receipt.setEndTime(new Date());
// return receiptRepository.save(receipt);
// }

@Override
public List<D> list() throws RepositoryException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<intercept-url pattern="/v1/**" access="isAuthenticated()" />

<http-basic />
<csrf disabled="true" />
</http>

<authentication-manager>
Expand Down
30 changes: 18 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@
<restygwt.version>1.3.1</restygwt.version>
<slf4j.version>1.7.5</slf4j.version>
<spring.version>4.2.4.RELEASE</spring.version>
<spring.cassandra.version>1.3.2.RELEASE</spring.cassandra.version>
<spring.security.version>3.2.5.RELEASE</spring.security.version>
<spring.security.oauth2.version>2.0.6.RELEASE</spring.security.oauth2.version>
<springdata.version>1.7.2.RELEASE</springdata.version>
<springdata.cassandra.version>1.3.2.RELEASE</springdata.cassandra.version>
<springdata.jpa.version>1.9.2.RELEASE</springdata.jpa.version>
<spring.security.version>4.0.3.RELEASE</spring.security.version>
<spring.security.oauth2.version>2.0.8.RELEASE</spring.security.oauth2.version>
<spring.test.dbunit.version>1.2.1</spring.test.dbunit.version>
<struts.version>2.3.4.1</struts.version>
<swagger.version>1.3.0</swagger.version>
Expand Down Expand Up @@ -481,19 +481,25 @@
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-cassandra</artifactId>
<version>${spring.cassandra.version}</version>
<version>${springdata.cassandra.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>${springdata.version}</version>
<version>${springdata.jpa.version}</version>
</dependency>
<dependency>
<groupId>com.mysema.querydsl</groupId>
<artifactId>querydsl-jpa</artifactId>
<version>${querydsl.version}</version>
</dependency>

<!--<dependency>-->
<!--<groupId>org.springframework.data</groupId>-->
<!--<artifactId>spring-data-commons</artifactId>-->
<!--<version>${springdata.commons.version}</version>-->
<!--</dependency>-->

<!-- Hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
Expand Down Expand Up @@ -783,12 +789,12 @@
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
<version>${cassandra-driver.version}</version>
<exclusions>
<exclusion>
<groupId>com.codahale.metrics</groupId>
<artifactId>metrics-core</artifactId>
</exclusion>
</exclusions>
<!--<exclusions>-->
<!--<exclusion>-->
<!--<groupId>com.codahale.metrics</groupId>-->
<!--<artifactId>metrics-core</artifactId>-->
<!--</exclusion>-->
<!--</exclusions>-->
</dependency>

<!-- cassandra unit -->
Expand Down

0 comments on commit c1d6303

Please sign in to comment.