Added latch count assertions.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user