Browse Source

Ignore some FreeMarker tests for JDK21

This reverts commit 07a5d8c91 and instead disables the relevant
FreeMarker tests for JDK21+ runs.
pull/30404/head
Brian Clozel 3 years ago
parent
commit
a91effcd86
  1. 3
      spring-webflux/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerMacroTests.java
  2. 2
      spring-webflux/src/test/resources/org/springframework/web/reactive/result/view/freemarker/test-macro.ftl
  3. 3
      spring-webmvc/src/test/java/org/springframework/web/servlet/view/freemarker/FreeMarkerMacroTests.java
  4. 2
      spring-webmvc/src/test/resources/org/springframework/web/servlet/view/freemarker/test.ftl

3
spring-webflux/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerMacroTests.java

@ -28,6 +28,8 @@ import java.util.Map; @@ -28,6 +28,8 @@ import java.util.Map;
import freemarker.template.Configuration;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledForJreRange;
import org.junit.jupiter.api.condition.JRE;
import reactor.core.publisher.Mono;
import org.springframework.beans.testfixture.beans.TestBean;
@ -116,6 +118,7 @@ public class FreeMarkerMacroTests { @@ -116,6 +118,7 @@ public class FreeMarkerMacroTests {
}
@Test
@DisabledForJreRange(min = JRE.JAVA_21)
public void age() throws Exception {
assertThat(getMacroOutput("AGE")).containsExactly("99");
}

2
spring-webflux/src/test/resources/org/springframework/web/reactive/result/view/freemarker/test-macro.ftl

@ -7,7 +7,7 @@ NAME @@ -7,7 +7,7 @@ NAME
${command.name}
AGE
${command.age()}
${command.age}
MESSAGE
<@spring.message "hello"/> <@spring.message "world"/>

3
spring-webmvc/src/test/java/org/springframework/web/servlet/view/freemarker/FreeMarkerMacroTests.java

@ -31,6 +31,8 @@ import jakarta.servlet.ServletException; @@ -31,6 +31,8 @@ import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletResponse;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledForJreRange;
import org.junit.jupiter.api.condition.JRE;
import org.springframework.beans.testfixture.beans.TestBean;
import org.springframework.core.io.ClassPathResource;
@ -145,6 +147,7 @@ public class FreeMarkerMacroTests { @@ -145,6 +147,7 @@ public class FreeMarkerMacroTests {
}
@Test
@DisabledForJreRange(min = JRE.JAVA_21)
public void testAge() throws Exception {
assertThat(getMacroOutput("AGE")).isEqualTo("99");
}

2
spring-webmvc/src/test/resources/org/springframework/web/servlet/view/freemarker/test.ftl

@ -7,7 +7,7 @@ NAME @@ -7,7 +7,7 @@ NAME
${command.name}
AGE
${command.age()}
${command.age}
MESSAGE
<@spring.message "hello"/> <@spring.message "world"/>

Loading…
Cancel
Save