From 374cc27f5e80024c274831291c6a2c02c8d9a776 Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Mon, 26 Aug 2024 10:57:14 -0700 Subject: [PATCH] Revert "Test running the macOS engine has no stray logging" (flutter/engine#54778) This reverts commit 7e82588c317d56a1fd106efe9e5fa840ff805442. Revert https://github.com/flutter/engine/pull/54716. This new check is flaking and isn't very high-value. https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8738562907128595441/+/u/test:_Host_Tests_for_host_profile/stdout [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../darwin/macos/framework/Source/FlutterEngineTest.mm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterEngineTest.mm b/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterEngineTest.mm index 7b7d4fb427..b7d8eb2311 100644 --- a/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterEngineTest.mm +++ b/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterEngineTest.mm @@ -210,7 +210,6 @@ TEST_F(FlutterEngineTest, CanLogToStdout) { // Replace stdout stream buffer with our own. StreamCapture stdout_capture(&std::cout); - StreamCapture stderr_capture(&std::cerr); // Launch the test entrypoint. FlutterEngine* engine = GetFlutterEngine(); @@ -220,12 +219,9 @@ TEST_F(FlutterEngineTest, CanLogToStdout) { latch.Wait(); stdout_capture.Stop(); - stderr_capture.Stop(); // Verify hello world was written to stdout. - // Check equality to ensure no unexpected stray logging. - EXPECT_EQ(stdout_capture.GetOutput(), "flutter: Hello logging\n"); - EXPECT_TRUE(stderr_capture.GetOutput().empty()); + EXPECT_TRUE(stdout_capture.GetOutput().find("Hello logging") != std::string::npos); } TEST_F(FlutterEngineTest, DISABLED_BackgroundIsBlack) {