mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
Internal change
PiperOrigin-RevId: 364931903
This commit is contained in:
@@ -564,7 +564,6 @@ Exception BasePcpHandler::WriteConnectionRequestFrame(
|
||||
EndpointChannel* endpoint_channel, const std::string& local_endpoint_id,
|
||||
const ByteArray& local_endpoint_info, std::int32_t nonce,
|
||||
const std::vector<proto::connections::Medium>& supported_mediums) {
|
||||
// TODO(b/172178926): Add WifiLan 5GHz and BSSID support.
|
||||
return endpoint_channel->Write(parser::ForConnectionRequest(
|
||||
local_endpoint_id, local_endpoint_info, nonce, /*supports_5_ghz =*/false,
|
||||
/*bssid=*/std::string{}, supported_mediums));
|
||||
|
||||
@@ -31,8 +31,8 @@ namespace connections {
|
||||
|
||||
// NOTE(std::string):
|
||||
// All the strings in internal class public interfaces should be exchanged as
|
||||
// const std::string& if they are immutable, and as std::string
|
||||
// it they are mutable.
|
||||
// const std::string& if they are immutable, and as std::string if they are
|
||||
// mutable.
|
||||
// This is to keep all the internal classes compatible with each other,
|
||||
// and minimize resources spent on the type conversion.
|
||||
// Project-wide, strings are either passed around as reference (which has
|
||||
|
||||
@@ -88,21 +88,37 @@ cc_test(
|
||||
"bluetooth_radio_test.cc",
|
||||
"lost_entity_tracker_test.cc",
|
||||
"uuid_test.cc",
|
||||
"webrtc_test.cc",
|
||||
"wifi_lan_test.cc",
|
||||
],
|
||||
shard_count = 16,
|
||||
deps = [
|
||||
":mediums",
|
||||
"//core/internal/mediums/webrtc",
|
||||
"//platform/base",
|
||||
"//platform/base:test_util",
|
||||
"//platform/impl/g3", # build_cleaner: keep
|
||||
"//platform/public:comm",
|
||||
"//platform/public:logging",
|
||||
"//platform/public:types",
|
||||
"//testing/base/public:gunit_main",
|
||||
"//absl/strings",
|
||||
"//absl/time",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "core_internal_mediums_webrtc_test",
|
||||
size = "small",
|
||||
srcs = [
|
||||
"webrtc_test.cc",
|
||||
],
|
||||
shard_count = 16,
|
||||
tags = ["notsan"], # NOTE(b/139734036): known data race in usrsctplib.
|
||||
deps = [
|
||||
":mediums",
|
||||
"//core/internal/mediums/webrtc",
|
||||
"//platform/base",
|
||||
"//platform/base:test_util",
|
||||
"//platform/impl/g3", # build_cleaner: keep
|
||||
"//platform/public:types",
|
||||
"//testing/base/public:gunit_main",
|
||||
"//absl/strings",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -384,12 +384,12 @@ TEST_F(WebRtcTest, ContinueAcceptingConnectionsOnComplete) {
|
||||
// Simulate a failure in receiving messages stream, WebRtc should restart
|
||||
// accepting connections.
|
||||
env_.SendWebRtcSignalingComplete(self_id.GetId(),
|
||||
/*success=*/false);
|
||||
/*success=*/false);
|
||||
EXPECT_TRUE(webrtc.IsAcceptingConnections(service_id));
|
||||
|
||||
// And a "success" message should not cause accepting connections to stop.
|
||||
env_.SendWebRtcSignalingComplete(self_id.GetId(),
|
||||
/*success=*/true);
|
||||
/*success=*/true);
|
||||
EXPECT_TRUE(webrtc.IsAcceptingConnections(service_id));
|
||||
|
||||
webrtc.StopAcceptingConnections(service_id);
|
||||
|
||||
@@ -104,7 +104,6 @@ class ServiceControllerRouter {
|
||||
void ClientDisconnecting(ClientProxy* client, const ResultCallback& callback);
|
||||
|
||||
private:
|
||||
friend class ServiceControllerRouterTest;
|
||||
static bool ClientHasConnectionToAtLeastOneEndpoint(
|
||||
ClientProxy* client, const std::vector<std::string>& remote_endpoint_ids);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user