Skip to content

Commit

Permalink
cleaned up test runs and added non persisten test config to activemq
Browse files Browse the repository at this point in the history
  • Loading branch information
fasseg committed Jun 1, 2013
1 parent 6f2ee6c commit 1d2e977
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
19 changes: 19 additions & 0 deletions fcrepo-fixity-core/pom.xml
Expand Up @@ -30,6 +30,10 @@
<artifactId>slf4j-log4j12</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
<exclusion>
<artifactId>log4j</artifactId>
<groupId>log4j</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -133,4 +137,19 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.6.2.201302030002</version>
<configuration>
<includes>
<include>org.fcrepo.fixity.*</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>

</project>
Expand Up @@ -7,7 +7,6 @@
import java.io.IOException;
import java.util.List;

import javax.inject.Named;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.Session;
Expand All @@ -18,6 +17,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;
import org.springframework.stereotype.Service;

/**
* This class is responsible for producing and consuming fixity messages form the JMS Queue
Expand All @@ -26,7 +26,7 @@
* @author frank asseg
*
*/
@Named("fixityService")
@Service
public class FixityService {

private final String defaultParentUri =
Expand Down
Expand Up @@ -6,25 +6,22 @@
import java.util.Arrays;

import org.fcrepo.fixity.service.FixityService;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;


/**
* @author frank asseg
*
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/unit-test-fixity.xml")
public class FixityServiceTest {

@Autowired
private FixityService fixityService;

@Test
@Ignore
public void testQueueFixityCheck() throws Exception {
fixityService.queueFixityCheck(Arrays.asList("/objects/testob1","/objects/testob2"));
}
Expand Down
6 changes: 3 additions & 3 deletions fcrepo-fixity-core/src/test/resources/unit-test-fixity.xml
Expand Up @@ -13,7 +13,7 @@
<bean id="fedoraFixityClient" class="org.fcrepo.fixity.client.FedoraFixityClient" />

<context:annotation-config />

<context:component-scan base-package="org.fcrepo.fixity.service" />


Expand All @@ -22,8 +22,8 @@
<amq:queue id="fixityQueue" physicalName="org.fcrepo.services.fixity.queue" />

<amq:connectionFactory id="fixityJmsFactory"
brokerURL="vm://localhost" />

brokerURL="vm://localhost?broker.persistence=false" />
<bean id="fixityJmsConnectionFactory"
class="org.springframework.jms.connection.SingleConnectionFactory"
p:targetConnectionFactory-ref="fixityJmsFactory" />
Expand Down

0 comments on commit 1d2e977

Please sign in to comment.