mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 08:24:13 +00:00
Add getter for OverflowStrategy in ConcurrentWebSocketSessionDecorator
This commit also includes a test for all configured properties. Closes gh-35132 Signed-off-by: Jeroen Meijer <jjgmeijer@gmail.com>
This commit is contained in:
committed by
Sam Brannen
parent
55634f972c
commit
41cb6ae1a5
+7
@@ -276,6 +276,13 @@ public class ConcurrentWebSocketSessionDecorator extends WebSocketSessionDecorat
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the configured overflow strategy.
|
||||
* @since 6.3
|
||||
*/
|
||||
public OverflowStrategy getOverflowStrategy() {
|
||||
return this.overflowStrategy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
+10
@@ -215,4 +215,14 @@ class ConcurrentWebSocketSessionDecoratorTests {
|
||||
assertThat(latch.await(5, TimeUnit.SECONDS)).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
void configuredProperties() {
|
||||
TestWebSocketSession session = new TestWebSocketSession();
|
||||
ConcurrentWebSocketSessionDecorator sessionDecorator = new ConcurrentWebSocketSessionDecorator(session, 42, 43, OverflowStrategy.DROP);
|
||||
|
||||
assertThat(sessionDecorator.getSendTimeLimit()).isEqualTo(42);
|
||||
assertThat(sessionDecorator.getBufferSizeLimit()).isEqualTo(43);
|
||||
assertThat(sessionDecorator.getOverflowStrategy()).isEqualTo(OverflowStrategy.DROP);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user