forked from Floorp-Projects/Floorp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1717924: Stop using an external STUN server for these tests. r=mj…
…f, a=test-only Differential Revision: https://phabricator.services.mozilla.com/D206273
- Loading branch information
1 parent
be437de
commit b3ddb10
Showing
1 changed file
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,9 +58,9 @@ using namespace mozilla; | |
|
||
static unsigned int kDefaultTimeout = 7000; | ||
|
||
// TODO([email protected]): This should get replaced with some non-external | ||
// solution like discussed in bug 860775. | ||
const std::string kDefaultStunServerHostname((char*)"stun.l.google.com"); | ||
// TODO: It would be nice to have a test STUN/TURN server that can run with | ||
// gtest. | ||
const std::string kDefaultStunServerHostname((char*)""); | ||
const std::string kBogusStunServerHostname( | ||
(char*)"stun-server-nonexistent.invalid"); | ||
const uint16_t kDefaultStunServerPort = 19305; | ||
|
@@ -1576,12 +1576,17 @@ class WebRtcIceConnectTest : public StunTest { | |
peer->SetMappingType(mapping_type_); | ||
peer->SetBlockUdp(block_udp_); | ||
} else if (setup_stun_servers) { | ||
std::vector<NrIceStunServer> stun_servers; | ||
if (stun_server_address_.empty()) { | ||
InitTestStunServer(); | ||
peer->UseTestStunServer(); | ||
} else { | ||
std::vector<NrIceStunServer> stun_servers; | ||
|
||
stun_servers.push_back(*NrIceStunServer::Create( | ||
stun_server_address_, kDefaultStunServerPort, kNrIceTransportUdp)); | ||
stun_servers.push_back(*NrIceStunServer::Create( | ||
stun_server_address_, kDefaultStunServerPort, kNrIceTransportUdp)); | ||
|
||
peer->SetStunServers(stun_servers); | ||
peer->SetStunServers(stun_servers); | ||
} | ||
} | ||
} | ||
|
||
|