Added latch count assertions.

This commit is contained in:
Mark Fisher
2008-01-16 04:18:17 +00:00
parent 79789d4b18
commit 74217bccec

View File

@@ -16,6 +16,7 @@
package org.springframework.integration.adapter;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
@@ -43,6 +44,7 @@ public class AdapterTests {
context.start();
String result = null;
latch.await(3000, TimeUnit.MILLISECONDS);
assertEquals("latch should have counted down within allotted time", 0, latch.getCount());
result = sink.get();
assertNotNull(result);
context.close();
@@ -58,6 +60,7 @@ public class AdapterTests {
context.start();
String result = null;
latch.await(3000, TimeUnit.MILLISECONDS);
assertEquals("latch should have counted down within allotted time", 0, latch.getCount());
result = sink.get();
assertNotNull(result);
context.close();