Add getter for overflow strategy
Also include test for all configured properties. Signed-off-by: Jeroen Meijer <jjgmeijer@gmail.com>
This commit is contained in:
parent
6a3311ba8e
commit
aef9792022
|
@ -275,6 +275,13 @@ public class ConcurrentWebSocketSessionDecorator extends WebSocketSessionDecorat
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the configured overflow strategy.
|
||||||
|
* @since 6.3
|
||||||
|
*/
|
||||||
|
public OverflowStrategy getOverflowStrategy() {
|
||||||
|
return this.overflowStrategy;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|
|
@ -215,4 +215,14 @@ class ConcurrentWebSocketSessionDecoratorTests {
|
||||||
assertThat(latch.await(5, TimeUnit.SECONDS)).isTrue();
|
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