Rate This Document
Findability
Accuracy
Completeness
Readability

Failed to Test sslValidationNotSkippedByDefault

Symptom

The sslValidationNotSkippedByDefault test failed during the compilation. The message "ReactiveCloudFoundryActuatorAutoConfigurationTests.sslValidationNotSkippedByDefault:283->lamdba$sslValidationNotSkippedByDefault$15:290..." is displayed.

Key Process and Cause Analysis

This problem is caused by the assertion failure.

Conclusion and Solution

  1. Open the ReactiveCloudFoundryActuatorAutoConfigurationTests.java file.
    vim ./spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfigurationTests.java
  2. Modify the content in line 290 as follows:
    webClient.get().uri("https://self-signed.badssl.com/").exchange().block(Duration.ofSeconds(30));
    /*
    * assertThatExceptionOfType(RuntimeException.class).isThrownBy:(() ->
    * webClient.get()
    * .uri("https://self-signed.badssl.com/").exchange().block(Duration.
    * ofSeconds(30))) .withCauseInstanceOf(SSLException.class);
    */

    Run the :set list command to check the format. Spaces are not allowed. Use Tab to indent the code.

  3. Press Esc, type :wq!, and press Enter to save the file and exit.
  4. Perform the sslValidationNotSkippedByDefault test again.