Skip to content

Commit c728e55

Browse files
izeyekazuki43zoo
authored andcommitted
Add a missing assertion in MyBatisCursorItemReaderTest.testCloseOnFailing()
(cherry picked from commit 96fd515)
1 parent d93541d commit c728e55

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/test/java/org/mybatis/spring/batch/MyBatisCursorItemReaderTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
import org.springframework.batch.item.ExecutionContext;
2828
import org.springframework.batch.item.ItemStreamException;
2929

30+
import static org.junit.Assert.fail;
31+
3032
/**
3133
* Tests for {@link MyBatisCursorItemReader}.
3234
*/
@@ -59,6 +61,7 @@ public void testCloseOnFailing() throws Exception {
5961
ExecutionContext executionContext = new ExecutionContext();
6062
try {
6163
itemReader.open(executionContext);
64+
fail();
6265
} catch (ItemStreamException e) {
6366
Assert.assertThat(e.getMessage(), Is.is("Failed to initialize the reader"));
6467
Assert.assertThat(e.getCause(), IsInstanceOf.instanceOf(RuntimeException.class));

0 commit comments

Comments
 (0)