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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user