diff --git a/fml/message_loop_task_queues_unittests.cc b/fml/message_loop_task_queues_unittests.cc index 1e4b0097f8f852970e0f43c3efe422aafff1972b..559e3152ac18a199f18ccca15c227a6c0fce1b30 100644 --- a/fml/message_loop_task_queues_unittests.cc +++ b/fml/message_loop_task_queues_unittests.cc @@ -192,17 +192,19 @@ TEST(MessageLoopTaskQueue, ConcurrentQueueAndTaskCreatingCounts) { auto creation_func = [&] { for (int i = 0; i < num_queues; i++) { fml::TaskQueueId queue_id = task_queues->CreateTaskQueue(); - created[queue_id - base_queue_id] = true; + int limit = queue_id - base_queue_id; + created[limit] = true; - for (int cur_q = 1; cur_q < i; cur_q++) { - if (created[cur_q - base_queue_id]) { - std::scoped_lock counter(task_count_mutex[cur_q - base_queue_id]); + for (int cur_q = 1; cur_q < limit; cur_q++) { + if (created[cur_q]) { + std::scoped_lock counter(task_count_mutex[cur_q]); int cur_num_tasks = rand() % 10; for (int k = 0; k < cur_num_tasks; k++) { task_queues->RegisterTask( - fml::TaskQueueId(cur_q), [] {}, fml::TimePoint::Now()); + fml::TaskQueueId(base_queue_id + cur_q), [] {}, + fml::TimePoint::Now()); } - num_tasks[cur_q - base_queue_id] += cur_num_tasks; + num_tasks[cur_q] += cur_num_tasks; } } } diff --git a/testing/run_tests.py b/testing/run_tests.py index 29639d29cd64077e0f74bbb165b4fabc3b014d73..67b53eb244909d21fed7fd1f4977752b219aa147 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -21,7 +21,7 @@ fonts_dir = os.path.join(buildroot_dir, 'flutter', 'third_party', 'txt', 'third_ roboto_font_path = os.path.join(fonts_dir, 'Roboto-Regular.ttf') dart_tests_dir = os.path.join(buildroot_dir, 'flutter', 'testing', 'dart',) -time_sensitve_test_flag = '--gtest_filter="-*TimeSensitiveTest*"' +time_sensitve_test_flag = '--gtest_filter=-*TimeSensitiveTest*' def IsMac(): return sys.platform == 'darwin'