File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -594,6 +594,32 @@ void testAll({
594
594
(instance) => instance.valueAsString, 'valueAsString' , '1' ));
595
595
});
596
596
597
+ test ('in parallel (in a batch) handles errors' , () async {
598
+ final library = isolate.rootLib! ;
599
+ final missingLibId = '' ;
600
+ final evaluation1 = setup.service
601
+ .evaluate (isolateId, missingLibId, 'MainClass(0).toString()' );
602
+ final evaluation2 = setup.service
603
+ .evaluate (isolateId, library.id! , 'MainClass(1).toString()' );
604
+
605
+ final results = await Future .wait ([evaluation1, evaluation2]);
606
+
607
+ expect (
608
+ results[0 ],
609
+ isA <ErrorRef >().having (
610
+ (instance) => instance.message,
611
+ 'message' ,
612
+ contains ('No batch result object ID' ),
613
+ ));
614
+ expect (
615
+ results[1 ],
616
+ isA <ErrorRef >().having (
617
+ (instance) => instance.message,
618
+ 'message' ,
619
+ contains ('No batch result object ID' ),
620
+ ));
621
+ });
622
+
597
623
test ('with scope override' , () async {
598
624
final library = isolate.rootLib! ;
599
625
final object = await setup.service
You can’t perform that action at this time.
0 commit comments