INT-1069: fix build failure caused by incomplete commit

This commit is contained in:
David Syer
2010-06-18 14:47:55 +00:00
parent d4badebb64
commit 2540b4aa48
3 changed files with 5 additions and 7 deletions

View File

@@ -2,8 +2,8 @@ package org.springframework.integration.jdbc;
import static org.junit.Assert.assertEquals;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -72,7 +72,7 @@ public class JdbcMessageStoreChannelTests {
public static class Service {
private static boolean fail = false;
private static List<String> messages = new ArrayList<String>();
private static List<String> messages = new CopyOnWriteArrayList<String>();
private static CountDownLatch latch = new CountDownLatch(0);
public static void reset(int count) {
fail = false;
@@ -83,8 +83,8 @@ public class JdbcMessageStoreChannelTests {
latch.await(timeout, TimeUnit.MILLISECONDS);
}
public String echo(String input) {
latch.countDown();
messages.add(input);
latch.countDown();
if (fail) {
throw new RuntimeException("Planned failure");
}

View File

@@ -154,7 +154,7 @@ public class JdbcMessageStoreTests {
Message<String> message = MessageBuilder.withPayload("foo").setCorrelationId(correlationId).build();
messageStore.addMessageToGroup(correlationId, message);
MessageGroup group = messageStore.getMessageGroup(correlationId);
messageStore.markMessageGroup(group);
group = messageStore.markMessageGroup(group);
assertEquals(1, group.getMarked().size());
}