mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
Automated Code Change
PiperOrigin-RevId: 806630829
This commit is contained in:
@@ -94,7 +94,7 @@ std::function<void(const ByteArray&)> MakeDataMonitor(const std::string& label,
|
||||
return [label, capture, mutex](const ByteArray& input) mutable {
|
||||
std::string s = std::string(input);
|
||||
{
|
||||
absl::MutexLock lock(mutex);
|
||||
absl::MutexLock lock(*mutex);
|
||||
*capture += s;
|
||||
}
|
||||
LOG(INFO) << "source='" << label << "'"
|
||||
@@ -271,7 +271,7 @@ TEST(BaseEndpointChannelTest, NotEncryptedReadWriteCanBeIntercepted) {
|
||||
// Verify expectations.
|
||||
EXPECT_EQ(rx_message, tx_message);
|
||||
{
|
||||
absl::MutexLock lock(&mutex);
|
||||
absl::MutexLock lock(mutex);
|
||||
std::string message{tx_message};
|
||||
EXPECT_TRUE(capture_a.find(message) != std::string::npos ||
|
||||
capture_b.find(message) != std::string::npos);
|
||||
@@ -335,7 +335,7 @@ TEST(BaseEndpointChannelTest, EncryptedReadWriteCanNotBeIntercepted) {
|
||||
// Verify expectations.
|
||||
EXPECT_EQ(rx_message, tx_message);
|
||||
{
|
||||
absl::MutexLock lock(&mutex);
|
||||
absl::MutexLock lock(mutex);
|
||||
std::string message{tx_message};
|
||||
EXPECT_TRUE(capture_a.find(message) == std::string::npos &&
|
||||
capture_b.find(message) == std::string::npos);
|
||||
|
||||
@@ -99,7 +99,7 @@ std::function<void(const ByteArray&)> MakeDataMonitor(absl::string_view label,
|
||||
return [label, capture, mutex](const ByteArray& input) mutable {
|
||||
std::string s = std::string(input);
|
||||
{
|
||||
absl::MutexLock lock(mutex);
|
||||
absl::MutexLock lock(*mutex);
|
||||
*capture += s;
|
||||
}
|
||||
LOG(INFO) << "source='" << label << "'"
|
||||
@@ -233,7 +233,7 @@ TEST(BaseEndpointChannelManagerTest, RegisterChannelEncryptedReadwrite) {
|
||||
// Verify expectations.
|
||||
EXPECT_EQ(rx_message, tx_message);
|
||||
{
|
||||
absl::MutexLock lock(&mutex);
|
||||
absl::MutexLock lock(mutex);
|
||||
std::string message{tx_message};
|
||||
EXPECT_TRUE(capture_a.find(message) == std::string::npos &&
|
||||
capture_b.find(message) == std::string::npos);
|
||||
|
||||
@@ -107,11 +107,11 @@ class MockEndpointChannel : public EndpointChannel {
|
||||
(analytics::AnalyticsRecorder*, const std::string&), (override));
|
||||
|
||||
bool IsClosed() const override {
|
||||
absl::MutexLock lock(&mutex_);
|
||||
absl::MutexLock lock(mutex_);
|
||||
return closed_;
|
||||
}
|
||||
void DoClose() {
|
||||
absl::MutexLock lock(&mutex_);
|
||||
absl::MutexLock lock(mutex_);
|
||||
closed_ = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user