From ff811e19225b9e0e29fe4d6e49949ab216043804 Mon Sep 17 00:00:00 2001 From: Glenn Renfro Date: Tue, 26 Apr 2022 12:46:29 -0400 Subject: [PATCH] Updated tests check contains vs absolute match --- .../cloud/task/SimpleTaskAutoConfigurationTests.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/spring-cloud-task-core/src/test/java/org/springframework/cloud/task/SimpleTaskAutoConfigurationTests.java b/spring-cloud-task-core/src/test/java/org/springframework/cloud/task/SimpleTaskAutoConfigurationTests.java index 3fed96b3..8c0f0119 100644 --- a/spring-cloud-task-core/src/test/java/org/springframework/cloud/task/SimpleTaskAutoConfigurationTests.java +++ b/spring-cloud-task-core/src/test/java/org/springframework/cloud/task/SimpleTaskAutoConfigurationTests.java @@ -128,10 +128,7 @@ public class SimpleTaskAutoConfigurationTests { verifyExceptionThrownDefaultExecutable(ApplicationContextException.class, "Failed to start " + "bean 'taskLifecycleListener'; nested exception is " + "org.springframework.dao.DataAccessResourceFailureException: " - + "Could not obtain sequence value; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: " - + "Syntax error in SQL statement \"SELECT FOOBARLESSSEQ.NEXTVAL FROM[*] DUAL\"; " - + "expected \"identifier\"; SQL statement:\n" - + "select foobarlessSEQ.nextval from dual [42001-200]", + + "Could not obtain sequence value; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: ", applicationContextRunner); } @@ -184,7 +181,7 @@ public class SimpleTaskAutoConfigurationTests { public void verifyExceptionThrown(Class classToCheck, String message, Executable executable) { assertThatExceptionOfType(classToCheck).isThrownBy(executable::execute) - .withMessage(message); + .withMessageContaining(message); } /**