File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -98,17 +98,28 @@ void main() {
98
98
isolateId,
99
99
scriptRef,
100
100
);
101
- return await client.addBreakpointWithScriptUri (
101
+ final breakpointAdded = expectLater (
102
+ stream,
103
+ emitsThrough (_hasKind (EventKind .kBreakpointAdded)),
104
+ );
105
+ final breakpoint = await client.addBreakpointWithScriptUri (
102
106
isolateId,
103
107
scriptRef.uri! ,
104
108
bpLine,
105
109
);
110
+ await breakpointAdded;
111
+ return breakpoint;
106
112
}
107
113
108
114
Future <void > removeBreakpoint (Breakpoint bp) async {
109
115
final vm = await client.getVM ();
110
116
final isolateId = vm.isolates! .first.id! ;
117
+ final breakpointRemoved = expectLater (
118
+ stream,
119
+ emitsThrough (_hasKind (EventKind .kBreakpointRemoved)),
120
+ );
111
121
await client.removeBreakpoint (isolateId, bp.id! );
122
+ await breakpointRemoved;
112
123
}
113
124
114
125
Future <void > resume () async {
@@ -387,7 +398,7 @@ void main() {
387
398
// the old string still as the closure has not been reevaluated.
388
399
await callEvaluateAndExpectLog (oldCapturedString);
389
400
});
390
- }, timeout: Timeout .factor (3 ));
401
+ }, timeout: Timeout .factor (2 ));
391
402
392
403
group ('when pause_isolates_on_start is false' , () {
393
404
late VmService client;
Original file line number Diff line number Diff line change @@ -110,11 +110,17 @@ void main() {
110
110
isolateId,
111
111
scriptRef,
112
112
);
113
- return await client.addBreakpointWithScriptUri (
113
+ final breakpointAdded = expectLater (
114
+ stream,
115
+ emitsThrough (_hasKind (EventKind .kBreakpointAdded)),
116
+ );
117
+ final breakpoint = await client.addBreakpointWithScriptUri (
114
118
isolateId,
115
119
scriptRef.uri! ,
116
120
bpLine,
117
121
);
122
+ await breakpointAdded;
123
+ return breakpoint;
118
124
}
119
125
120
126
Future <void > resume () async {
You can’t perform that action at this time.
0 commit comments