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() {
9898 isolateId,
9999 scriptRef,
100100 );
101- return await client.addBreakpointWithScriptUri (
101+ final breakpointAdded = expectLater (
102+ stream,
103+ emitsThrough (_hasKind (EventKind .kBreakpointAdded)),
104+ );
105+ final breakpoint = await client.addBreakpointWithScriptUri (
102106 isolateId,
103107 scriptRef.uri! ,
104108 bpLine,
105109 );
110+ await breakpointAdded;
111+ return breakpoint;
106112 }
107113
108114 Future <void > removeBreakpoint (Breakpoint bp) async {
109115 final vm = await client.getVM ();
110116 final isolateId = vm.isolates! .first.id! ;
117+ final breakpointRemoved = expectLater (
118+ stream,
119+ emitsThrough (_hasKind (EventKind .kBreakpointRemoved)),
120+ );
111121 await client.removeBreakpoint (isolateId, bp.id! );
122+ await breakpointRemoved;
112123 }
113124
114125 Future <void > resume () async {
@@ -387,7 +398,7 @@ void main() {
387398 // the old string still as the closure has not been reevaluated.
388399 await callEvaluateAndExpectLog (oldCapturedString);
389400 });
390- }, timeout: Timeout .factor (3 ));
401+ }, timeout: Timeout .factor (2 ));
391402
392403 group ('when pause_isolates_on_start is false' , () {
393404 late VmService client;
Original file line number Diff line number Diff line change @@ -110,11 +110,17 @@ void main() {
110110 isolateId,
111111 scriptRef,
112112 );
113- return await client.addBreakpointWithScriptUri (
113+ final breakpointAdded = expectLater (
114+ stream,
115+ emitsThrough (_hasKind (EventKind .kBreakpointAdded)),
116+ );
117+ final breakpoint = await client.addBreakpointWithScriptUri (
114118 isolateId,
115119 scriptRef.uri! ,
116120 bpLine,
117121 );
122+ await breakpointAdded;
123+ return breakpoint;
118124 }
119125
120126 Future <void > resume () async {
You can’t perform that action at this time.
0 commit comments