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
98738d22
Commit
98738d22
authored
Feb 26, 2020
by
Johnny Lim
Committed by
Stephane Nicoll
Feb 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish tests
See gh-20318
parent
296a13a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
PluginXmlParserTests.java
...ramework/boot/build/mavenplugin/PluginXmlParserTests.java
+1
-2
DataSourceAutoConfigurationTests.java
.../autoconfigure/jdbc/DataSourceAutoConfigurationTests.java
+3
-2
No files found.
buildSrc/src/test/java/org/springframework/boot/build/mavenplugin/PluginXmlParserTests.java
View file @
98738d22
...
...
@@ -18,7 +18,6 @@ package org.springframework.boot.build.mavenplugin;
import
java.io.File
;
import
java.io.FileNotFoundException
;
import
java.util.Arrays
;
import
java.util.stream.Collectors
;
import
org.junit.jupiter.api.Test
;
...
...
@@ -46,7 +45,7 @@ public class PluginXmlParserTests {
assertThat
(
plugin
.
getVersion
()).
isEqualTo
(
"2.2.0.GRADLE-SNAPSHOT"
);
assertThat
(
plugin
.
getGoalPrefix
()).
isEqualTo
(
"spring-boot"
);
assertThat
(
plugin
.
getMojos
().
stream
().
map
(
PluginXmlParser
.
Mojo
::
getGoal
).
collect
(
Collectors
.
toList
()))
.
isEqualTo
(
Arrays
.<
String
>
asList
(
"build-info"
,
"help"
,
"repackage"
,
"run"
,
"start"
,
"stop"
)
);
.
containsExactly
(
"build-info"
,
"help"
,
"repackage"
,
"run"
,
"start"
,
"stop"
);
}
@Test
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfigurationTests.java
View file @
98738d22
...
...
@@ -154,6 +154,7 @@ class DataSourceAutoConfigurationTests {
@Test
void
dataSourceWhenNoConnectionPoolsAreAvailableWithUrlDoesNotCreateDataSource
()
{
this
.
contextRunner
.
with
(
hideConnectionPools
())
.
withPropertyValues
(
"spring.datasource.url:jdbc:hsqldb:mem:testdb"
)
.
run
((
context
)
->
assertThat
(
context
).
doesNotHaveBean
(
DataSource
.
class
));
}
...
...
@@ -210,8 +211,8 @@ class DataSourceAutoConfigurationTests {
}
private
static
Function
<
ApplicationContextRunner
,
ApplicationContextRunner
>
hideConnectionPools
()
{
return
(
runner
)
->
runner
.
withClassLoader
(
new
FilteredClassLoader
(
"org.apache.tomcat"
,
"com.zaxxer.hikari"
,
"org.apache.commons.dbcp
"
,
"org.apache.commons.dbcp2"
));
return
(
runner
)
->
runner
.
withClassLoader
(
new
FilteredClassLoader
(
"org.apache.tomcat"
,
"com.zaxxer.hikari
"
,
"org.apache.commons.dbcp2"
));
}
private
<
T
extends
DataSource
>
void
assertDataSource
(
Class
<
T
>
expectedType
,
List
<
String
>
hiddenPackages
,
...
...
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