Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Minor: Ensure AtomJMSIT starts with consistent state
  • Loading branch information
Andrew Woods committed Oct 11, 2013
1 parent acc3f4f commit 9e7a174
Showing 1 changed file with 2 additions and 4 deletions.
Expand Up @@ -92,6 +92,7 @@ public void acquireConnection() throws JMSException {
session = connection.createSession(false, AUTO_ACKNOWLEDGE);
consumer = session.createConsumer(session.createTopic("fedora"));
consumer.setMessageListener(this);
entry = null;
}

@After
Expand All @@ -116,7 +117,6 @@ public void testAtomStream() throws LoginException, RepositoryException,
if (entry == null) fail("Waited a second, got no messages");
List<Category> categories = copyOf(entry.getCategories("xsd:string"));
final String title = entry.getTitle();
entry = null;
String path = null;
for (Category cat : categories) {
if (cat.getLabel().equals("fedora-types:pid")) {
Expand All @@ -141,8 +141,7 @@ public void testAtomStreamNodePath() throws LoginException, RepositoryException,
session.logout();

if (entry == null) fail("Waited a second, got no messages");
List<Category> categories = copyOf(entry.getCategories("xsd:string"));
entry = null;
List<Category> categories = copyOf(entry.getCategories("xsd:string"));
String path = null;
for (Category cat : categories) {
if (cat.getLabel().equals("path")) {
Expand All @@ -169,7 +168,6 @@ public void testDatastreamTerm() throws NoSuchNodeTypeException,
if (entry == null) fail("Waited a second, got no messages");
List<Category> categories = copyOf(entry.getCategories("xsd:string"));
entry = null;

String path = null;

logger.trace("Matched {} categories with scheme xsd:string", categories
Expand Down

0 comments on commit 9e7a174

Please sign in to comment.