This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git

commit 97451ce80940ae277a3207a9c90ed95c89795489
Author: David Smiley <[email protected]>
AuthorDate: Tue Jun 2 22:27:28 2026 -0400

    build/tests: new tests.ssl option to force SSL when supported (#4454)
    
    Forces SSL if not suppressed.  But doesn't do the inverse yet.
    
    (cherry picked from commit ab4564b746ed1c5fe0d1e0a50f796a4226201c98)
---
 gradle/testing/randomization.gradle                                 | 1 +
 solr/test-framework/src/java/org/apache/solr/util/RandomizeSSL.java | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/gradle/testing/randomization.gradle 
b/gradle/testing/randomization.gradle
index 83d71e7e907..2bf7d2ae965 100644
--- a/gradle/testing/randomization.gradle
+++ b/gradle/testing/randomization.gradle
@@ -133,6 +133,7 @@ configure(allprojects.findAll {project -> 
project.path.startsWith(":solr")}) {
       testOptions += [
           [propName: 'tests.src.home', value: null, description: "See 
SOLR-14023."],
           [propName: 'solr.tests.use.numeric.points', value: null, 
description: "Point implementation to use (true=numerics, false=trie)."],
+          [propName: 'tests.ssl', value: false, description: "Force SSL on for 
all tests that support it (respects @SuppressSSL)."],
       ]
     }
   }
diff --git 
a/solr/test-framework/src/java/org/apache/solr/util/RandomizeSSL.java 
b/solr/test-framework/src/java/org/apache/solr/util/RandomizeSSL.java
index 54e19285363..1e8afd0a506 100644
--- a/solr/test-framework/src/java/org/apache/solr/util/RandomizeSSL.java
+++ b/solr/test-framework/src/java/org/apache/solr/util/RandomizeSSL.java
@@ -126,6 +126,10 @@ public @interface RandomizeSSL {
                           LuceneTestCase.TEST_NIGHTLY,
                           LuceneTestCase.RANDOM_MULTIPLIER));
 
+      if (Boolean.getBoolean("tests.ssl") && ssl > 0.0D) {
+        return new SSLTestConfig(true, useClientAuth);
+      }
+
       return new SSLTestConfig(useSSL, useClientAuth);
     }
 

Reply via email to