Skip to content

Commit 4bd7cbf

Browse files
committed
Update test to handle new exception message.
1 parent 7a3f0c7 commit 4bd7cbf

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

spring-cloud-task-core/src/test/java/org/springframework/cloud/task/SimpleTaskAutoConfigurationTests.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2021 the original author or authors.
2+
* Copyright 2015-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.
@@ -146,9 +146,7 @@ public void testMultipleConfigurers() {
146146

147147
verifyExceptionThrownDefaultExecutable(BeanCreationException.class,
148148
"Error creating bean "
149-
+ "with name 'simpleTaskAutoConfiguration': Invocation of init "
150-
+ "method failed; nested exception is java.lang.IllegalStateException:"
151-
+ " Expected one TaskConfigurer but found 2",
149+
+ "with name 'simpleTaskAutoConfiguration': Invocation of init method failed",
152150
applicationContextRunner);
153151
}
154152

@@ -162,10 +160,7 @@ public void testMultipleDataSources() {
162160

163161
verifyExceptionThrownDefaultExecutable(BeanCreationException.class,
164162
"Error creating bean "
165-
+ "with name 'simpleTaskAutoConfiguration': Invocation of init method "
166-
+ "failed; nested exception is java.lang.IllegalStateException: To use "
167-
+ "the default TaskConfigurer the context must contain no more than "
168-
+ "one DataSource, found 2",
163+
+ "with name 'simpleTaskAutoConfiguration': Invocation of init method failed",
169164
applicationContextRunner);
170165

171166
}

0 commit comments

Comments
 (0)