dcsctp: Convert socket tests not to use fixtures
Following https://abseil.io/tips/122 to make tests easier to understand and adds a bit of flexibility to create sockets with custom parameters. This also simplifies handover tests. Additionally, AdvanceTime will now also run timers, as that was easily forgotten previously. Bug: None Change-Id: Ieb5eece7aca51c98a7634ed1c61646383ad1712d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253782 Reviewed-by: Sergey Sukhanov <sergeysu@webrtc.org> Commit-Queue: Victor Boivie <boivie@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36141}
This commit is contained in:

committed by
WebRTC LUCI CQ

parent
0f50cc2849
commit
eee0e336a2
File diff suppressed because it is too large
Load Diff
@ -153,12 +153,6 @@ class MockDcSctpSocketCallbacks : public DcSctpSocketCallbacks {
|
||||
return timeout_manager_.GetNextExpiredTimeout();
|
||||
}
|
||||
|
||||
void Reset() {
|
||||
sent_packets_.clear();
|
||||
received_messages_.clear();
|
||||
timeout_manager_.Reset();
|
||||
}
|
||||
|
||||
private:
|
||||
const std::string log_prefix_;
|
||||
TimeMs now_ = TimeMs(0);
|
||||
|
@ -97,8 +97,6 @@ class FakeTimeoutManager {
|
||||
return absl::nullopt;
|
||||
}
|
||||
|
||||
void Reset() { timers_.clear(); }
|
||||
|
||||
private:
|
||||
const std::function<TimeMs()> get_time_;
|
||||
webrtc::flat_set<FakeTimeout*> timers_;
|
||||
|
Reference in New Issue
Block a user