Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Fix FlutterInjectorTest assumptions about how the executor service assigns tasks to threads #44775

Merged
merged 1 commit into from
Aug 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;

import androidx.test.ext.junit.runners.AndroidJUnit4;
import io.flutter.embedding.engine.deferredcomponents.PlayStoreDeferredComponentManager;
Expand Down Expand Up @@ -73,8 +74,9 @@ public void executorCreatesAndNamesNewThreadsByDefault()
threadNames = injector.executorService().invokeAll(callables);

assertEquals(threadNames.size(), 2);
assertEquals(threadNames.get(0).get(), "flutter-worker-0");
assertEquals(threadNames.get(1).get(), "flutter-worker-1");
for (Future<String> name : threadNames) {
assertTrue(name.get().startsWith("flutter-worker-"));
}
}

@Test
Expand Down