Test custom comment prefix with one that does not work by default

See gh-18285
pull/18464/head
aohana 5 years ago committed by Andy Wilkinson
parent a607ddeadf
commit 51a8c73b7b

@ -50,8 +50,8 @@ public class QuartzDataSourceInitializerTests {
@Test
public void commentPrefixCanBeCustomized() {
this.contextRunner.withUserConfiguration(TestConfiguration.class).withPropertyValues(
"spring.quartz.jdbc.comment-prefix=##",
"spring.quartz.jdbc.schema=classpath:org/springframework/boot/autoconfigure/quartz/tables_@@platform@@.sql")
"spring.quartz.jdbc.comment-prefix=**",
"spring.quartz.jdbc.schema=classpath:org/springframework/boot/autoconfigure/quartz/tables_**_comments.sql")
.run((context) -> {
JdbcTemplate jdbcTemplate = context.getBean(JdbcTemplate.class);
assertThat(jdbcTemplate.queryForObject("SELECT COUNT(*) FROM QRTZ_TEST_TABLE", Integer.class))

@ -1,10 +1,10 @@
## This is a test script to check custom comment prefix is taken into account
** This is a test script to check ** is treated as a comment prefix when prefix is customized
CREATE TABLE QRTZ_TEST_TABLE (
SCHED_NAME VARCHAR(120) NOT NULL,
CALENDAR_NAME VARCHAR (200) NOT NULL
);
## Another comment
** Another comment
COMMIT;
Loading…
Cancel
Save