Merge branch '5.3.x'

# Conflicts:
#	spring-test/src/main/java/org/springframework/test/context/web/socket/MockServerContainerContextCustomizerFactory.java
#	spring-test/src/test/java/org/springframework/test/context/web/socket/WebSocketServletServerContainerFactoryBeanTests.java
This commit is contained in:
Sam Brannen
2022-08-28 18:48:21 +02:00
2 changed files with 22 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2022 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.
@@ -17,6 +17,7 @@
package org.springframework.test.context.web.socket;
import jakarta.websocket.server.ServerContainer;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
@@ -45,6 +46,20 @@ class WebSocketServletServerContainerFactoryBeanTests {
assertThat(serverContainer.getDefaultMaxTextMessageBufferSize()).isEqualTo(42);
}
/*
* @Nested test class to verify that the MockServerContainerContextCustomizerFactory
* properly supports finding @WebAppConfiguration on an enclosing class.
*/
@Nested
class NestedTests {
@Test // gh-29037
void servletServerContainerFactoryBeanSupport(@Autowired ServerContainer serverContainer) {
assertThat(serverContainer.getDefaultMaxTextMessageBufferSize()).isEqualTo(42);
}
}
@Configuration
@EnableWebSocket