diff options
author | Victor Boivie <boivie@webrtc.org> | 2021-05-07 10:55:32 +0200 |
---|---|---|
committer | WebRTC LUCI CQ <webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2021-05-07 11:36:57 +0000 |
commit | 3dadf8b06f141645afe4df98ab8b50e7ccc4f4f4 (patch) | |
tree | d426ef8cf3eae7e82dd515e736f973950c0bc862 /net/dcsctp/socket/dcsctp_socket_test.cc | |
parent | dfc11d55af84851c58a1c03423a634e3bc9ba08f (diff) | |
download | webrtc-3dadf8b06f141645afe4df98ab8b50e7ccc4f4f4.tar.gz |
dcsctp: Log socket name also in callbacks
This makes it easier to understand which socket that experience an error
or abort. Aborts are now also logged, which was missed previously.
Bug: webrtc:12614
Change-Id: Ie5e4357b3e5450106cc6cc28c1e9578ad53d073a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217764
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33947}
Diffstat (limited to 'net/dcsctp/socket/dcsctp_socket_test.cc')
-rw-r--r-- | net/dcsctp/socket/dcsctp_socket_test.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/dcsctp/socket/dcsctp_socket_test.cc b/net/dcsctp/socket/dcsctp_socket_test.cc index e08bdbaf70..2b2e9880f1 100644 --- a/net/dcsctp/socket/dcsctp_socket_test.cc +++ b/net/dcsctp/socket/dcsctp_socket_test.cc @@ -180,6 +180,8 @@ class DcSctpSocketTest : public testing::Test { protected: explicit DcSctpSocketTest(bool enable_message_interleaving = false) : options_(MakeOptionsForTest(enable_message_interleaving)), + cb_a_("A"), + cb_z_("Z"), sock_a_("A", cb_a_, nullptr, options_), sock_z_("Z", cb_z_, nullptr, options_) {} @@ -765,7 +767,7 @@ TEST_F(DcSctpSocketTest, OnePeerReconnects) { sock_z_.ReceivePacket(cb_a_.ConsumeSentPacket()); // Create a new association, z2 - and don't use z anymore. - testing::NiceMock<MockDcSctpSocketCallbacks> cb_z2; + testing::NiceMock<MockDcSctpSocketCallbacks> cb_z2("Z2"); DcSctpSocket sock_z2("Z2", cb_z2, nullptr, options_); sock_z2.Connect(); @@ -888,7 +890,7 @@ TEST_F(DcSctpSocketTest, ReceivingErrorChunkReportsAsCallback) { TEST_F(DcSctpSocketTest, PassingHighWatermarkWillOnlyAcceptCumAckTsn) { // Create a new association, z2 - and don't use z anymore. - testing::NiceMock<MockDcSctpSocketCallbacks> cb_z2; + testing::NiceMock<MockDcSctpSocketCallbacks> cb_z2("Z2"); DcSctpOptions options = options_; options.max_receiver_window_buffer_size = 100; DcSctpSocket sock_z2("Z2", cb_z2, nullptr, options); |