Rate This Document
Findability
Accuracy
Completeness
Readability

ElasticSearch Test Error of the spring-boot-autoconfigure Module

Symptom

In the ElasticSearch test, the annotation @Testcontainers(disabledWithoutDocker = true) is used to check whether the environment supports Docker. If Docker is supported, execute this test case. If Docker is not supported, skip this test case.

Key Process and Cause Analysis

If Docker has been installed and enabled in the compilation environment, stop Docker before compilation.

Conclusion and Solution

  1. Run the following command to stop the Docker service:
    systemctl stop docker
  2. After the Docker service is disabled, perform the ElasticSearch test again.