Updated test names
This commit is contained in:
@@ -16,7 +16,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||||||
|
|
||||||
public class CountdownLatchExampleTest {
|
public class CountdownLatchExampleTest {
|
||||||
@Test
|
@Test
|
||||||
public void shouldBlockUntilLatchIsReleased() throws InterruptedException {
|
public void whenParallelProcessing_thenMainThreadWillBlockUntilCompletion() throws InterruptedException {
|
||||||
|
|
||||||
// Given
|
// Given
|
||||||
List<String> outputScraper = Collections.synchronizedList(new ArrayList<>());
|
List<String> outputScraper = Collections.synchronizedList(new ArrayList<>());
|
||||||
@@ -45,7 +45,7 @@ public class CountdownLatchExampleTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void shouldEventuallyTimeout() throws InterruptedException {
|
public void whenFailingToParallelProcess_thenMainThreadShouldTimeout() throws InterruptedException {
|
||||||
// Given
|
// Given
|
||||||
List<String> outputScraper = Collections.synchronizedList(new ArrayList<>());
|
List<String> outputScraper = Collections.synchronizedList(new ArrayList<>());
|
||||||
CountDownLatch countDownLatch = new CountDownLatch(5);
|
CountDownLatch countDownLatch = new CountDownLatch(5);
|
||||||
|
|||||||
Reference in New Issue
Block a user