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:
parent
55634f972c
commit
41cb6ae1a5
|
@ -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() {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue