Skip to content

Commit a70e9f2

Browse files
dnfieldEgor
authored and
Egor
committed
Remove unnecessary work around from test in prep for vm_service migration (flutter#3209)
1 parent e364dc9 commit a70e9f2

File tree

3 files changed

+5
-26
lines changed

3 files changed

+5
-26
lines changed

packages/android_alarm_manager/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.4.5+16
2+
3+
* Remove unnecessary workaround from test.
4+
15
## 0.4.5+15
26

37
* Update android compileSdkVersion to 29.

packages/android_alarm_manager/example/test_driver/integration_test.dart

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,14 @@ import 'dart:convert';
77
import 'dart:io';
88

99
import 'package:flutter_driver/flutter_driver.dart';
10-
import 'package:vm_service_client/vm_service_client.dart';
11-
12-
Future<StreamSubscription<VMIsolateRef>> resumeIsolatesOnPause(
13-
FlutterDriver driver) async {
14-
final VM vm = await driver.serviceClient.getVM();
15-
for (VMIsolateRef isolateRef in vm.isolates) {
16-
final VMIsolate isolate = await isolateRef.load();
17-
if (isolate.isPaused) {
18-
await isolate.resume();
19-
}
20-
}
21-
return driver.serviceClient.onIsolateRunnable
22-
.asBroadcastStream()
23-
.listen((VMIsolateRef isolateRef) async {
24-
final VMIsolate isolate = await isolateRef.load();
25-
if (isolate.isPaused) {
26-
await isolate.resume();
27-
}
28-
});
29-
}
3010

3111
Future<void> main() async {
3212
final FlutterDriver driver = await FlutterDriver.connect();
33-
// flutter drive causes isolates to be paused on spawn. The background isolate
34-
// for this plugin will need to be resumed for the test to pass.
35-
final StreamSubscription<VMIsolateRef> subscription =
36-
await resumeIsolatesOnPause(driver);
3713
final String data = await driver.requestData(
3814
null,
3915
timeout: const Duration(minutes: 1),
4016
);
4117
await driver.close();
42-
await subscription.cancel();
4318
final Map<String, dynamic> result = jsonDecode(data);
4419
exit(result['result'] == 'true' ? 0 : 1);
4520
}

packages/android_alarm_manager/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Flutter plugin for accessing the Android AlarmManager service, and
44
# 0.4.y+z is compatible with 1.0.0, if you land a breaking change bump
55
# the version to 2.0.0.
66
# See more details: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0
7-
version: 0.4.5+15
7+
version: 0.4.5+16
88
homepage: https://github.com/flutter/plugins/tree/master/packages/android_alarm_manager
99

1010
dependencies:

0 commit comments

Comments
 (0)