minor test tweak to fix build
This commit is contained in:
@@ -24,6 +24,7 @@ import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.transaction.UnexpectedRollbackException;
|
||||
|
||||
/**
|
||||
* @author Dan Garrette
|
||||
@@ -127,6 +128,15 @@ public class FaultTolerantExceptionClassesTests implements ApplicationContextAwa
|
||||
assertEquals("[1, 2, 4]", writer.getCommitted().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNonSkippableUnchecked() throws Exception {
|
||||
writer.setExceptionType(UnexpectedRollbackException.class);
|
||||
StepExecution stepExecution = launchStep("skippableStep");
|
||||
assertEquals(BatchStatus.FAILED, stepExecution.getStatus());
|
||||
assertEquals("[1, 2, 3]", writer.getWritten().toString());
|
||||
assertEquals("[]", writer.getCommitted().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFatalChecked() throws Exception {
|
||||
writer.setExceptionType(FatalSkippableException.class);
|
||||
|
||||
Reference in New Issue
Block a user