Skip to content

Commit 454de0b

Browse files
committed
Polish
1 parent 953df7c commit 454de0b

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/AbstractEndpointTests.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 the original author or authors.
2+
* Copyright 2012-2017 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.
@@ -66,9 +66,14 @@ public AbstractEndpointTests(Class<?> configClass, Class<?> type, String id,
6666
public void setup() {
6767
this.context = new AnnotationConfigApplicationContext();
6868
this.context.register(JacksonAutoConfiguration.class, this.configClass);
69+
configureEnvironment(this.context);
6970
this.context.refresh();
7071
}
7172

73+
protected void configureEnvironment(AnnotationConfigApplicationContext context) {
74+
75+
}
76+
7277
@After
7378
public void close() {
7479
if (this.context != null) {

spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/LiquibaseEndpointTests.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ public LiquibaseEndpointTests() {
4646
"endpoints.liquibase");
4747
}
4848

49+
@Override
50+
protected void configureEnvironment(AnnotationConfigApplicationContext context) {
51+
EnvironmentTestUtils.addEnvironment(context,
52+
"spring.datasource.generate-unique-name=true");
53+
}
54+
4955
@Test
5056
public void invoke() throws Exception {
5157
DataSource dataSource = this.context.getBean(DataSource.class);
@@ -70,7 +76,6 @@ public void invokeWithCustomSchema() throws Exception {
7076
this.context = new AnnotationConfigApplicationContext();
7177
EnvironmentTestUtils.addEnvironment(this.context,
7278
"liquibase.default-schema=CUSTOMSCHEMA",
73-
"spring.datasource.generate-unique-name=true",
7479
"spring.datasource.schema=classpath:/db/create-custom-schema.sql");
7580
this.context.register(Config.class);
7681
this.context.refresh();

0 commit comments

Comments
 (0)