You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by sa...@apache.org on 2024/08/28 14:32:09 UTC
(solr) branch branch_9x updated: Enabling test-retry-gradle-plugin (#2665)
This is an automated email from the ASF dual-hosted git repository.
sanjaydutt pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new 56b9271962d Enabling test-retry-gradle-plugin (#2665)
56b9271962d is described below
commit 56b9271962dd9b35b629beab71aacd4dd64709e3
Author: Sanjay Dutt <sa...@apache.org>
AuthorDate: Wed Aug 28 19:51:03 2024 +0530
Enabling test-retry-gradle-plugin (#2665)
(cherry picked from commit 1818841868d70adebde364165d60114f164952de)
---
build.gradle | 1 +
gradle/testing/retry-test.gradle | 31 +++++++++++++++++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/build.gradle b/build.gradle
index 21dfd7195a1..e26f26cd99f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -130,6 +130,7 @@ apply from: file('gradle/testing/fail-on-no-tests.gradle')
apply from: file('gradle/testing/fail-on-unsupported-jdk.gradle')
apply from: file('gradle/testing/alternative-jdk-support.gradle')
apply from: file('gradle/java/jar-manifest.gradle')
+apply from: file('gradle/testing/retry-test.gradle')
// Publishing and releasing
apply from: file('gradle/maven/defaults-maven.gradle')
diff --git a/gradle/testing/retry-test.gradle b/gradle/testing/retry-test.gradle
new file mode 100644
index 00000000000..4759b3fe2cf
--- /dev/null
+++ b/gradle/testing/retry-test.gradle
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+allprojects {
+ plugins.withType(JavaPlugin) {
+ tasks.withType(Test) {
+ develocity.testRetry {
+ if (isCIBuild) {
+ // For more info on params: https://github.com/gradle/test-retry-gradle-plugin
+ maxRetries = 3
+ maxFailures = 10
+ failOnPassedAfterRetry = true
+ }
+ }
+ }
+ }
+}
\ No newline at end of file