From 80367b5298b3bad15dfcb6207dd288d04c1ffa7a Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Mon, 27 Jan 2020 16:00:34 -0800 Subject: [PATCH] Remove buggy assertion in EmbedderTest::CanPostTaskToAllNativeThreads. (flutter/engine#16071) This was introduced in https://github.com/flutter/engine/commit/ef3100057685e3a3ba364b2bfd3abf9977239390. The assertion was originally written to check that more than 4 threads were managed by the engine (UI, Platform, GPU, IO + ConcurrentWQWorkers). However, the assertion actually only checked the count of workers in the ConcurrentWQ. As written, this assertion would fail on all hosts with a hardware concurrency of less than 4. Remove the assertion. The engine threads count and its assertions already check callbacks on workers. So this check was incorrect and redundant. --- .../flutter/shell/platform/embedder/tests/embedder_unittests.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/engine/src/flutter/shell/platform/embedder/tests/embedder_unittests.cc b/engine/src/flutter/shell/platform/embedder/tests/embedder_unittests.cc index d63685c65e..5dc4e44234 100644 --- a/engine/src/flutter/shell/platform/embedder/tests/embedder_unittests.cc +++ b/engine/src/flutter/shell/platform/embedder/tests/embedder_unittests.cc @@ -3936,7 +3936,6 @@ TEST_F(EmbedderTest, CanPostTaskToAllNativeThreads) { sync_latch.Wait(); - ASSERT_GT(worker_count, 4u /* three base threads plus workers */); const auto engine_threads_count = worker_count + 4u; struct Captures {