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

Commit 4f967f3

Browse files
Fix FlutterInjectorTest assumptions about how the executor service assigns tasks to threads (#44775)
1 parent d259a52 commit 4f967f3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

shell/platform/android/test/io/flutter/FlutterInjectorTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import static org.junit.Assert.assertNotNull;
99
import static org.junit.Assert.assertNull;
1010
import static org.junit.Assert.assertThrows;
11+
import static org.junit.Assert.assertTrue;
1112

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

7576
assertEquals(threadNames.size(), 2);
76-
assertEquals(threadNames.get(0).get(), "flutter-worker-0");
77-
assertEquals(threadNames.get(1).get(), "flutter-worker-1");
77+
for (Future<String> name : threadNames) {
78+
assertTrue(name.get().startsWith("flutter-worker-"));
79+
}
7880
}
7981

8082
@Test

0 commit comments

Comments
 (0)