Skip to content

Commit 872764d

Browse files
committed
Try to increase the logging verbosity for a pass in actions
1 parent f07b165 commit 872764d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

analytics/integration_test/src/integration_test.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,16 +250,21 @@ TEST_F(FirebaseAnalyticsTest, TestSetLogCallback) {
250250
std::future<void> finished = finishedPromise.get_future();
251251
bool log_callback_called = false;
252252

253+
// Save the current log level, and set to verbose for this test.
254+
firebase::LogLevel current_log_level = firebase::GetLogLevel();
255+
firebase::SetLogLevel(firebase::LogLevel::kLogLevelVerbose);
256+
253257
firebase::analytics::SetLogCallback(
254258
[&](firebase::LogLevel log_level, const char* message) {
255259
log_callback_called = true;
256260
finishedPromise.set_value();
257261
});
258262

259-
// Pass kUnknown to trigger a warning log directly from the DLL (on Windows),
263+
// Pass kUnknown to trigger a warning log directly from the DLL (on
264+
// Windows),
260265
firebase::analytics::NotifyAppLifecycleChange(firebase::analytics::kUnknown);
261266

262-
if (finished.wait_for(std::chrono::seconds(60)) ==
267+
if (finished.wait_for(std::chrono::seconds(10)) ==
263268
std::future_status::timeout) {
264269
ADD_FAILURE() << "Timed out waiting for log callback";
265270
} else {
@@ -268,6 +273,7 @@ TEST_F(FirebaseAnalyticsTest, TestSetLogCallback) {
268273

269274
EXPECT_TRUE(log_callback_called);
270275
firebase::analytics::SetLogCallback(nullptr);
276+
firebase::SetLogLevel(current_log_level);
271277
}
272278
#endif // defined(_WIN32)
273279

0 commit comments

Comments
 (0)