Skip to content

Commit

Permalink
Fix connections_test
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 555282324
  • Loading branch information
jgsobczak authored and copybara-github committed Aug 10, 2023
1 parent 5393daf commit e703b21
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions connections/c/bluetooth_classic_server_socket_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ TEST(BluetoothClassicServerSocketTest,
PerformanceTimer::start();

core.StartAdvertising(SERVICE_ID, AdvertiseOptions, request_info,
{.result_cb = [&](Status status) {
[&](Status status) {
request_result = status;
notification.Notify();
}});
});

if (notification.WaitForNotificationWithTimeout(
absl::Seconds(TimeoutSeconds))) {
Expand Down Expand Up @@ -163,10 +163,10 @@ TEST(BluetoothClassicServerSocketTest,
PerformanceTimer::start();

core.StartAdvertising(SERVICE_ID, AdvertiseOptions, request_info,
{.result_cb = [&](Status status) {
[&](Status status) {
request_result = status;
notification2.Notify();
}});
});

if (notification2.WaitForNotificationWithTimeout(
absl::Seconds(TimeoutSeconds))) {
Expand Down Expand Up @@ -209,10 +209,10 @@ TEST(BluetoothClassicServerSocketTest,

PerformanceTimer::start();

core.StopAdvertising({.result_cb = [&](Status status) {
core.StopAdvertising([&](Status status) {
request_result = status;
notification3.Notify();
}});
});

if (notification3.WaitForNotificationWithTimeout(
absl::Seconds(TimeoutSeconds))) {
Expand Down Expand Up @@ -273,10 +273,10 @@ TEST(BluetoothClassicServerSocketTest, DISABLED_MultiRunWithTimeoutReproStuck) {
PerformanceTimer::start();

core.StartAdvertising(SERVICE_ID, AdvertiseOptions, request_info,
{.result_cb = [&](Status status) {
[&](Status status) {
request_result = status;
notification.Notify();
}});
});

if (notification.WaitForNotificationWithTimeout(
absl::Seconds(TimeoutSeconds))) {
Expand Down Expand Up @@ -319,10 +319,10 @@ TEST(BluetoothClassicServerSocketTest, DISABLED_MultiRunWithTimeoutReproStuck) {
PerformanceTimer::start();

core.StartAdvertising(SERVICE_ID, AdvertiseOptions, request_info,
{.result_cb = [&](Status status) {
[&](Status status) {
request_result = status;
notification2.Notify();
}});
});

if (notification2.WaitForNotificationWithTimeout(
absl::Seconds(TimeoutSeconds))) {
Expand Down Expand Up @@ -361,10 +361,10 @@ TEST(BluetoothClassicServerSocketTest, DISABLED_MultiRunWithTimeoutReproStuck) {

PerformanceTimer::start();

core.StopAdvertising({.result_cb = [&](Status status) {
core.StopAdvertising([&](Status status) {
request_result = status;
notification3.Notify();
}});
});

if (notification3.WaitForNotificationWithTimeout(
absl::Seconds(TimeoutSeconds))) {
Expand Down Expand Up @@ -424,10 +424,10 @@ TEST(BluetoothClassicServerSocketTest, DISABLED_SingleRunNoTimeoutReproStuck) {
PerformanceTimer::start();

core.StartAdvertising(SERVICE_ID, AdvertiseOptions, request_info,
{.result_cb = [&](Status status) {
[&](Status status) {
request_result = status;
notification.Notify();
}});
});

notification.WaitForNotification();
PerformanceTimer::stop();
Expand All @@ -451,10 +451,10 @@ TEST(BluetoothClassicServerSocketTest, DISABLED_SingleRunNoTimeoutReproStuck) {
PerformanceTimer::start();

core.StartAdvertising(SERVICE_ID, AdvertiseOptions, request_info,
{.result_cb = [&](Status status) {
[&](Status status) {
request_result = status;
notification2.Notify();
}});
});

notification2.WaitForNotification();
PerformanceTimer::stop();
Expand All @@ -477,10 +477,10 @@ TEST(BluetoothClassicServerSocketTest, DISABLED_SingleRunNoTimeoutReproStuck) {

PerformanceTimer::start();

core.StopAdvertising({.result_cb = [&](Status status) {
core.StopAdvertising([&](Status status) {
request_result = status;
notification3.Notify();
}});
});

notification3.WaitForNotification();
PerformanceTimer::stop();
Expand Down Expand Up @@ -521,10 +521,10 @@ TEST(BluetoothClassicServerSocketTest, DISABLED_MultiRunNoTimeoutReproStuck) {
PerformanceTimer::start();

core.StartAdvertising(SERVICE_ID, AdvertiseOptions, request_info,
{.result_cb = [&](Status status) {
[&](Status status) {
request_result = status;
notification.Notify();
}});
});

notification.WaitForNotification();

Expand All @@ -551,10 +551,10 @@ TEST(BluetoothClassicServerSocketTest, DISABLED_MultiRunNoTimeoutReproStuck) {
PerformanceTimer::start();

core.StartAdvertising(SERVICE_ID, AdvertiseOptions, request_info,
{.result_cb = [&](Status status) {
[&](Status status) {
request_result = status;
notification2.Notify();
}});
});

notification2.WaitForNotification();
PerformanceTimer::stop();
Expand All @@ -580,10 +580,10 @@ TEST(BluetoothClassicServerSocketTest, DISABLED_MultiRunNoTimeoutReproStuck) {

PerformanceTimer::start();

core.StopAdvertising({.result_cb = [&](Status status) {
core.StopAdvertising([&](Status status) {
request_result = status;
notification3.Notify();
}});
});

notification3.WaitForNotification();
PerformanceTimer::stop();
Expand Down

0 comments on commit e703b21

Please sign in to comment.