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
aa63070f
Commit
aa63070f
authored
Apr 30, 2020
by
Scott Frederick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply test conventions unconditionally
See gh-21272
parent
8ec16bd0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
JavaConventions.java
.../java/org/springframework/boot/build/JavaConventions.java
+12
-11
No files found.
buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java
View file @
aa63070f
...
@@ -107,18 +107,19 @@ class JavaConventions {
...
@@ -107,18 +107,19 @@ class JavaConventions {
}
}
private
void
configureTestConventions
(
Project
project
)
{
private
void
configureTestConventions
(
Project
project
)
{
if
(
Boolean
.
valueOf
(
System
.
getenv
(
"CI"
)))
{
project
.
getTasks
().
withType
(
Test
.
class
,
(
test
)
->
{
withOptionalBuildJavaHome
(
project
,
(
javaHome
)
->
test
.
setExecutable
(
javaHome
+
"/bin/java"
));
test
.
useJUnitPlatform
();
test
.
setMaxHeapSize
(
"1024M"
);
});
if
(
Boolean
.
parseBoolean
(
System
.
getenv
(
"CI"
)))
{
project
.
getPlugins
().
apply
(
TestRetryPlugin
.
class
);
project
.
getPlugins
().
apply
(
TestRetryPlugin
.
class
);
project
.
getTasks
().
withType
(
Test
.
class
,
(
test
)
->
{
project
.
getTasks
().
withType
(
Test
.
class
,
withOptionalBuildJavaHome
(
project
,
(
javaHome
)
->
test
.
setExecutable
(
javaHome
+
"/bin/java"
));
(
test
)
->
project
.
getPlugins
().
withType
(
TestRetryPlugin
.
class
,
(
testRetryPlugin
)
->
{
test
.
useJUnitPlatform
();
TestRetryTaskExtension
testRetry
=
test
.
getExtensions
().
getByType
(
TestRetryTaskExtension
.
class
);
test
.
setMaxHeapSize
(
"1024M"
);
testRetry
.
getFailOnPassedAfterRetry
().
set
(
true
);
project
.
getPlugins
().
withType
(
TestRetryPlugin
.
class
,
(
testRetryPlugin
)
->
{
testRetry
.
getMaxRetries
().
set
(
3
);
TestRetryTaskExtension
testRetry
=
test
.
getExtensions
().
getByType
(
TestRetryTaskExtension
.
class
);
}));
testRetry
.
getFailOnPassedAfterRetry
().
set
(
true
);
testRetry
.
getMaxRetries
().
set
(
3
);
});
});
}
}
}
}
...
...
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