Browse Source

Modify tests so they pass in AOT mode

... when run via AotIntegrationTests.endToEndTestsForEntireSpringTestModule().
pull/31445/head
Sam Brannen 1 year ago
parent
commit
3ad79e919b
  1. 2
      spring-test/src/test/java/org/springframework/test/context/hierarchies/web/EarTests.java
  2. 4
      spring-test/src/test/java/org/springframework/test/context/hierarchies/web/RootWacEarTests.java
  3. 6
      spring-test/src/test/java/org/springframework/test/web/servlet/samples/spr/EncodedUriTests.java
  4. 4
      spring-test/src/test/java/org/springframework/test/web/servlet/samples/spr/HttpOptionsTests.java

2
spring-test/src/test/java/org/springframework/test/context/hierarchies/web/EarTests.java

@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
@SpringJUnitConfig
class EarTests {
@Configuration
@Configuration(proxyBeanMethods = false)
static class EarConfig {
@Bean

4
spring-test/src/test/java/org/springframework/test/context/hierarchies/web/RootWacEarTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -38,7 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -38,7 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat;
@ContextHierarchy(@ContextConfiguration)
class RootWacEarTests extends EarTests {
@Configuration
@Configuration(proxyBeanMethods = false)
static class RootWacConfig {
@Bean

6
spring-test/src/test/java/org/springframework/test/web/servlet/samples/spr/EncodedUriTests.java

@ -72,7 +72,7 @@ public class EncodedUriTests { @@ -72,7 +72,7 @@ public class EncodedUriTests {
}
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableWebMvc
static class WebConfig implements WebMvcConfigurer {
@ -93,7 +93,7 @@ public class EncodedUriTests { @@ -93,7 +93,7 @@ public class EncodedUriTests {
}
@Controller
private static class MyController {
static class MyController {
@RequestMapping(value = "/circuit/{id}", method = RequestMethod.GET)
String getCircuit(@PathVariable String id, Model model) {
@ -103,7 +103,7 @@ public class EncodedUriTests { @@ -103,7 +103,7 @@ public class EncodedUriTests {
}
@Component
private static class HandlerMappingConfigurer implements BeanPostProcessor, PriorityOrdered {
static class HandlerMappingConfigurer implements BeanPostProcessor, PriorityOrdered {
@Override
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {

4
spring-test/src/test/java/org/springframework/test/web/servlet/samples/spr/HttpOptionsTests.java

@ -65,7 +65,7 @@ public class HttpOptionsTests { @@ -65,7 +65,7 @@ public class HttpOptionsTests {
}
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableWebMvc
static class WebConfig implements WebMvcConfigurer {
@ -76,7 +76,7 @@ public class HttpOptionsTests { @@ -76,7 +76,7 @@ public class HttpOptionsTests {
}
@Controller
private static class MyController {
static class MyController {
private final AtomicInteger counter = new AtomicInteger();

Loading…
Cancel
Save