|
|
@ -71,7 +71,8 @@ import org.springframework.util.StringUtils;
|
|
|
|
* <li>with a max heap of 1024M
|
|
|
|
* <li>with a max heap of 1024M
|
|
|
|
* <li>to run after any Checkstyle and format checking tasks
|
|
|
|
* <li>to run after any Checkstyle and format checking tasks
|
|
|
|
* <li>to enable retries with a maximum of three attempts when running on CI
|
|
|
|
* <li>to enable retries with a maximum of three attempts when running on CI
|
|
|
|
* <li>to use predictive test selection when running locally
|
|
|
|
* <li>to use predictive test selection when the value of the
|
|
|
|
|
|
|
|
* {@code ENABLE_PREDICTIVE_TEST_SELECTION} environment variable is {@code true}
|
|
|
|
* </ul>
|
|
|
|
* </ul>
|
|
|
|
* <li>A {@code testRuntimeOnly} dependency upon
|
|
|
|
* <li>A {@code testRuntimeOnly} dependency upon
|
|
|
|
* {@code org.junit.platform:junit-platform-launcher} is added to projects with the
|
|
|
|
* {@code org.junit.platform:junit-platform-launcher} is added to projects with the
|
|
|
@ -182,8 +183,12 @@ class JavaConventions {
|
|
|
|
testRetry.getMaxRetries().set(isCi() ? 3 : 0);
|
|
|
|
testRetry.getMaxRetries().set(isCi() ? 3 : 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean isCi() {
|
|
|
|
|
|
|
|
return Boolean.parseBoolean(System.getenv("CI"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void configurePredictiveTestSelection(Test test) {
|
|
|
|
private void configurePredictiveTestSelection(Test test) {
|
|
|
|
if (!isCi()) {
|
|
|
|
if (isPredictiveTestSelectionEnabled()) {
|
|
|
|
PredictiveTestSelectionExtension predictiveTestSelection = test.getExtensions()
|
|
|
|
PredictiveTestSelectionExtension predictiveTestSelection = test.getExtensions()
|
|
|
|
.getByType(PredictiveTestSelectionExtension.class);
|
|
|
|
.getByType(PredictiveTestSelectionExtension.class);
|
|
|
|
predictiveTestSelection.getEnabled().set(true);
|
|
|
|
predictiveTestSelection.getEnabled().set(true);
|
|
|
@ -192,8 +197,8 @@ class JavaConventions {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private boolean isCi() {
|
|
|
|
private boolean isPredictiveTestSelectionEnabled() {
|
|
|
|
return Boolean.parseBoolean(System.getenv("CI"));
|
|
|
|
return Boolean.parseBoolean(System.getenv("ENABLE_PREDICTIVE_TEST_SELECTION"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void configureJavadocConventions(Project project) {
|
|
|
|
private void configureJavadocConventions(Project project) {
|
|
|
|