forked from firka/flutter
Make PollingDeviceDiscovery start the initial poll faster. (#130755)
This will speed up the initial population of the device list.
This commit is contained in:
@@ -234,7 +234,6 @@ void main() {
|
||||
FakeAsync().run((FakeAsync time) {
|
||||
final FakePollingDeviceDiscovery pollingDeviceDiscovery = FakePollingDeviceDiscovery();
|
||||
pollingDeviceDiscovery.startPolling();
|
||||
time.elapse(const Duration(milliseconds: 4001));
|
||||
|
||||
// First check should use the default polling timeout
|
||||
// to quickly populate the list.
|
||||
|
||||
@@ -397,10 +397,7 @@ void main() {
|
||||
expect(devicesAdded[0].id, fakeDevice['id']);
|
||||
expect(devicesAdded[1].id, fakeDevice2['id']);
|
||||
});
|
||||
// Explicit timeout is needed because the default timeout is 2s, but `startPolling` waits for
|
||||
// 4s before making its first poll.
|
||||
// TODO(chingjun): Remove the timeout.
|
||||
}, timeout: const Timeout(Duration(seconds: 6)));
|
||||
});
|
||||
|
||||
group('ProxiedDartDevelopmentService', () {
|
||||
testWithoutContext('forwards start and shutdown to remote', () async {
|
||||
|
||||
Reference in New Issue
Block a user