Fix TestTurnServer to not depend on rtc::Thread::socketserver() accessor
Updated all calls to constructor to pass appropriate
rtc::SocketFactory explicitly.
Bug: webrtc:13145
Change-Id: Ibaa764c7eaffbdb8dd6825fd518c54b37316ecb8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/238807
Auto-Submit: Niels Moller <nisse@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35436}
diff --git a/pc/test/integration_test_helpers.h b/pc/test/integration_test_helpers.h
index 6c60ba8..fb59092 100644
--- a/pc/test/integration_test_helpers.h
+++ b/pc/test/integration_test_helpers.h
@@ -1548,12 +1548,14 @@
cricket::ProtocolType type = cricket::ProtocolType::PROTO_UDP,
const std::string& common_name = "test turn server") {
rtc::Thread* thread = network_thread();
+ rtc::SocketFactory* socket_factory = fss_.get();
std::unique_ptr<cricket::TestTurnServer> turn_server =
network_thread()->Invoke<std::unique_ptr<cricket::TestTurnServer>>(
- RTC_FROM_HERE,
- [thread, internal_address, external_address, type, common_name] {
+ RTC_FROM_HERE, [thread, socket_factory, internal_address,
+ external_address, type, common_name] {
return std::make_unique<cricket::TestTurnServer>(
- thread, internal_address, external_address, type,
+ thread, socket_factory, internal_address, external_address,
+ type,
/*ignore_bad_certs=*/true, common_name);
});
turn_servers_.push_back(std::move(turn_server));