From d9d93e4e988628b845bed54bb8faf055a6b60635 Mon Sep 17 00:00:00 2001 From: Yutaka Takeda Date: Sat, 23 Apr 2022 15:04:41 -0700 Subject: [PATCH] Added a unit test Relates to pion/sctp#218 --- settingengine_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/settingengine_test.go b/settingengine_test.go index 80817ca34bf..dd661d5e255 100644 --- a/settingengine_test.go +++ b/settingengine_test.go @@ -233,3 +233,12 @@ func TestSetDTLSRetransmissionInterval(t *testing.T) { t.Errorf("Failed to set DTLS retransmission interval") } } + +func TestSetSCTPMaxReceiverBufferSize(t *testing.T) { + s := SettingEngine{} + assert.Equal(t, uint32(0), s.sctp.maxReceiveBufferSize) + + expSize := uint32(4 * 1024 * 1024) + s.SetSCTPMaxReceiveBufferSize(expSize) + assert.Equal(t, expSize, s.sctp.maxReceiveBufferSize) +}