dsmiley commented on code in PR #5363:
URL: https://github.com/apache/solr/pull/5363#discussion_r4623771747


##########
dev-docs/gradle-help/tests.txt:
##########
@@ -85,6 +85,14 @@ Test group filters can be combined into Boolean expressions:
 gradlew -p solr/core test -Ptests.filter="default and not(@awaitsfix)"
 
 
+Docker (Testcontainers) tests
+-----------------------------

Review Comment:
   I don't love an entire heading just for this...



##########
solr/test-framework/src/java/org/apache/solr/util/TestcontainersUtil.java:
##########
@@ -35,17 +36,28 @@ public final class TestcontainersUtil {
 
   private TestcontainersUtil() {}
 
+  /**
+   * System property controlling Docker use: {@code false} skips Docker tests 
without contacting
+   * Docker, {@code true} fails them if Docker is unavailable, unset 
auto-detects.
+   */
+  public static final String SYSPROP_DOCKER = "tests.docker";
+
   /**
    * Asserts that Docker/Testcontainers is available in the current 
environment and that the
    * specified image has a platform variant compatible with the current 
architecture (specifically
-   * verifying on s390x). If either check fails, the calling test is skipped 
via {@link Assume}.
+   * verifying on s390x). If either check fails, the calling test is skipped 
via {@link Assume}. See
+   * {@link #SYSPROP_DOCKER}.
    *
    * @param dockerImage the Docker image to check
    */
   public static void assumeContainerAvailable(String dockerImage) {
-    Assume.assumeTrue(
-        "Docker/Testcontainers not available; skipping test",
-        DockerClientFactory.instance().isDockerAvailable());
+    String dockerProp = EnvUtils.getProperty(SYSPROP_DOCKER);

Review Comment:
   Probably shouldn't use `EnvUtils` as the `tests.` prefix doesn't get the env 
conversion treatment (if I recall).  They are handled via 
`randomization.gradle`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to