Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
30ff329e
Commit
30ff329e
authored
Jul 28, 2017
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
71ade559
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
22 deletions
+23
-22
LiquibaseEndpointTests.java
...amework/boot/actuate/endpoint/LiquibaseEndpointTests.java
+4
-3
HazelcastJpaDependencyAutoConfigurationTests.java
...zelcast/HazelcastJpaDependencyAutoConfigurationTests.java
+19
-19
No files found.
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/LiquibaseEndpointTests.java
View file @
30ff329e
...
...
@@ -51,9 +51,10 @@ public class LiquibaseEndpointTests extends AbstractEndpointTests<LiquibaseEndpo
public
void
invokeWithCustomSchema
()
throws
Exception
{
this
.
context
.
close
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
TestPropertyValues
.
of
(
"liquibase.default-schema=CUSTOMSCHEMA"
,
"spring.datasource.generate-unique-name=true"
,
"spring.datasource.schema=classpath:/db/create-custom-schema.sql"
)
TestPropertyValues
.
of
(
"liquibase.default-schema=CUSTOMSCHEMA"
,
"spring.datasource.generate-unique-name=true"
,
"spring.datasource.schema=classpath:/db/create-custom-schema.sql"
)
.
applyTo
(
this
.
context
);
this
.
context
.
register
(
CustomSchemaConfig
.
class
);
this
.
context
.
refresh
();
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastJpaDependencyAutoConfigurationTests.java
View file @
30ff329e
...
...
@@ -53,24 +53,24 @@ public class HazelcastJpaDependencyAutoConfigurationTests {
@Test
public
void
registrationIfHazelcastInstanceHasRegularBeanName
()
{
this
.
contextRunner
.
withUserConfiguration
(
HazelcastConfiguration
.
class
)
.
run
((
context
)
->
{
assertThat
(
postProcessors
(
context
))
.
containsKey
(
"hazelcastInstanceJpaDependencyPostProcessor"
);
assertThat
(
entityManagerFactoryDependencies
(
context
)).
contains
(
"hazelcastInstance"
);
});
this
.
contextRunner
.
withUserConfiguration
(
HazelcastConfiguration
.
class
)
.
run
((
context
)
->
{
assertThat
(
postProcessors
(
context
))
.
containsKey
(
"hazelcastInstanceJpaDependencyPostProcessor"
);
assertThat
(
entityManagerFactoryDependencies
(
context
))
.
contains
(
"hazelcastInstance"
);
});
}
@Test
public
void
noRegistrationIfHazelcastInstanceHasCustomBeanName
()
{
this
.
contextRunner
.
withUserConfiguration
(
HazelcastCustomNameConfiguration
.
class
)
.
run
((
context
)
->
{
assertThat
(
entityManagerFactoryDependencies
(
context
))
.
doesNotContain
(
"hazelcastInstance"
);
assertThat
(
postProcessors
(
context
))
.
doesNotContainKey
(
"hazelcastInstanceJpaDependencyPostProcessor"
);
});
this
.
contextRunner
.
withUserConfiguration
(
HazelcastCustomNameConfiguration
.
class
)
.
run
((
context
)
->
{
assertThat
(
entityManagerFactoryDependencies
(
context
))
.
doesNotContain
(
"hazelcastInstance"
);
assertThat
(
postProcessors
(
context
)).
doesNotContainKey
(
"hazelcastInstanceJpaDependencyPostProcessor"
);
});
}
@Test
...
...
@@ -86,8 +86,8 @@ public class HazelcastJpaDependencyAutoConfigurationTests {
@Test
public
void
noRegistrationWithNoEntityManagerFactory
()
{
new
ApplicationContextRunner
().
withUserConfiguration
(
HazelcastConfiguration
.
class
)
.
withConfiguration
(
AutoConfigurations
.
of
(
HazelcastJpaDependencyAutoConfiguration
.
class
))
.
withConfiguration
(
AutoConfigurations
.
of
(
HazelcastJpaDependencyAutoConfiguration
.
class
))
.
run
((
context
)
->
assertThat
(
postProcessors
(
context
)).
doesNotContainKey
(
"hazelcastInstanceJpaDependencyPostProcessor"
));
}
...
...
@@ -99,13 +99,13 @@ public class HazelcastJpaDependencyAutoConfigurationTests {
private
List
<
String
>
entityManagerFactoryDependencies
(
AssertableApplicationContext
context
)
{
String
[]
dependsOn
=
((
BeanDefinitionRegistry
)
context
.
getSourceApplicationContext
())
.
getBeanDefinition
(
"entityManagerFactory"
).
getDependsOn
();
String
[]
dependsOn
=
((
BeanDefinitionRegistry
)
context
.
getSourceApplicationContext
()).
getBeanDefinition
(
"entityManagerFactory"
)
.
getDependsOn
();
return
dependsOn
!=
null
?
Arrays
.
asList
(
dependsOn
)
:
Collections
.<
String
>
emptyList
();
}
@Configuration
static
class
HazelcastConfiguration
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment