Skip to content

Commit 95a3cf0

Browse files
committed
Fix tests
1 parent 3454cec commit 95a3cf0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

spring-batch-core/src/test/java/org/springframework/batch/core/step/builder/FaultTolerantStepBuilderTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@
2121
import org.springframework.batch.core.Step;
2222
import org.springframework.batch.core.configuration.xml.DummyItemReader;
2323
import org.springframework.batch.core.configuration.xml.DummyItemWriter;
24+
import org.springframework.batch.core.configuration.xml.DummyJobRepository;
25+
import org.springframework.batch.support.transaction.ResourcelessTransactionManager;
2426

2527
import static org.junit.Assert.assertEquals;
26-
import static org.junit.Assert.fail;
2728

2829
public class FaultTolerantStepBuilderTests {
2930

@@ -37,6 +38,7 @@ public void faultTolerantReturnsSameInstance() {
3738
public void testAnnotationBasedStepExecutionListenerRegistration() {
3839
// given
3940
FaultTolerantStepBuilder<Object, Object> faultTolerantStepBuilder = new StepBuilder("myStep")
41+
.repository(new DummyJobRepository()).transactionManager(new ResourcelessTransactionManager())
4042
.<Object, Object>chunk(5).reader(new DummyItemReader()).writer(new DummyItemWriter()).faultTolerant()
4143
.listener(new StepBuilderTests.AnnotationBasedStepExecutionListener());
4244

spring-batch-infrastructure/src/test/java/org/springframework/batch/item/mail/DefaultMailErrorHandlerTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2021 the original author or authors.
2+
* Copyright 2006-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -48,7 +48,7 @@ public void testSetMaxMessageLength() {
4848
}
4949
catch (MailException e) {
5050
String msg = e.getMessage();
51-
assertTrue("Wrong message: " + msg, msg.matches(".*SimpleMailMessage: f;.*"));
51+
assertTrue("Wrong message: " + msg, msg.matches(".*SimpleMailMessage: f.*"));
5252
}
5353
}
5454

0 commit comments

Comments
 (0)