Sync before checking logs

The events are logged on a different threads. We should wait until all logs
are processed before verifying expectations.

PiperOrigin-RevId: 547926810
This commit is contained in:
Janusz Sobczak
2023-07-13 14:41:36 -07:00
committed by Copybara-Service
parent 41f0b3d330
commit 31e4b45dd4
@@ -977,6 +977,7 @@ TEST(AnalyticsRecorderTest, StartListeningForIncomingConnectionsWorks) {
>
>)pb");
analytics_recorder.Sync();
EXPECT_THAT(event_logger.GetLoggedClientSession(),
Partially(EqualsProto(strategy_session_proto)));
}